Laravel Quick Start

Quick reminder of steps to setup a Laravel project on Ubuntu/Linux Mint and similar.

First install composer:

Install PHP dependencies:

 

Use composer to create your Laravel project:

Install composer.json packages:

Generate a key for your new project into the .env file:

Amend the .env file with database details and anything else you want to customise. You may want to install mysql with

Auth Scaffolding

Create the login and register views, migrations etc:

Test the project:

Databases

Add more migrations with:

An example table create is shown beloe:

To seed the database with entries create a seeder

Then to perform the seedings use:

 

Creating Models and Controllers

To generate a new model use:

The model code is generated and can be expanded as below:

The line below creates a controller with functions for update, create, delete etc:

Adding Composer Components

Add the entry in the composer.json file then install:

Add entries to the config/app.php file under the ‘providers’ array and ‘aliases’ arrary.

Then publish the config files:

php laravel vendor publish

 

Leave a Reply

  • (will not be published)

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">