Nov.23

Git Laravel project setup in to local computer

Step 1:

Create a database locally named as your project name or wish utf8_general_ci

forexample we are creating laravel_cms database name and its collation into utf8_unicode_ci

 

Step 2:

Download composer https://getcomposer.org/download/

Pull Laravel/php project from git provider.

or place of your project file into your directory.

 

 

Step 3:

Rename .env.example file to .env inside your project root and fill the database information. (windows wont let you do it, so you have to open your console cd your project root directory and run mv .env.example .env )

Step 4:

Open the console and cd your project root directory

>mv .env.example .env

$cp .env.example .env
$php artisan key:generate

to change .env.example file to .env file.

 

Step 5:

Setup your database setting in to project.

for command line

>vim .env

edit and set your database name, host, password

 

DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=laravel_cms
DB_USERNAME=root
DB_PASSWORD=

for my case i have these credential for the database system.

 

Step 6:

Run

$composer install

$composer update

or

$php composer.phar install

it will create your vendor file for the laravel project.

 

Step 7:

Run

$php artisan key:generate

It will create key for project CSRF token.

 

Step 8:

Run

$php artisan migrate

it is for making table schema and its primary seeds(data) which are written in migration folder.

 

Step 9:

Run

$php artisan db:seed to run seeders, if any.

Primary seeds(data) which are written in migration folder.

 

Step 10:

Run

$php artisan serve

 

Share this Story:
  • facebook
  • twitter
  • gplus

Leave a comment

Facebook Comment