Laravel Installation

Installation
1. https://getcomposer.org/ > download > Composer-Setup.exe(follow and install)
Note:choose the command line php you want to use. There is nothing there.
Solution: c:\xampp2\php\php.exe
2. https://laravel.com > documents > version
composer global require "laravel/installer"
> to make laravel global (Optional line)
Above command will install laravel installer. Now go to the directory where you want to create the laravel project and execute the following project.
composer create-project --prefer-dist laravel/laravel projectName "5.4.*"
Now go to the project folder projectName change .env.example filename to .env and execute the following command
php artisan key:generate
This command will set a app_key in .env file. Every application should have a unique key.
php artisan package:discover
Now change database information in .env file.
Now go to your project folder and when you execute the following command the server will serve at http://localhost:8000
php artisan serve
To create controller goto app/http/controller then run the following command
php artisan make:controller ControllerNamesController --resource
To create new eloquent model goto app folder and run the following command
php artisan make:model ModelName -m
Here m will create a migration for a new table
php artisan make:auth
php artisan make:migration create_tableNames_table

Labels: ,

© copyright-2020 Rejaul