how to run laravel project on localhost code example
Example 1: how to start composer in laravel project on localhost
php artisan serve
/*
To START composer in project folder on MacOS:
The original answer is:
The full command works like this:
php artisan serve --host=<host IP address> --port=<port to use>
php artisan serve --host=127.0.0.1 --port=8080
AFTER: php artisan serve TERMINAL SHOWS:
Laravel development server started: <http://127.0.0.1:8000>
IN WEB BROWSER ENTER THE:
http://127.0.0.1:8000 , OR:
http://localhost:8000/
AND YOU ARE IN ! ! !
*/
http://127.0.0.1:8000/
http://localhost:8000/
Example 2: start someones laravel project
1. composer update --no-scripts or composer install
2. php artisan key:generate
3. rename example.env to .env
4. Change database credentials, set debug mode! Change app url
4. php artisan migrate(make sure u have the database running in the server)
5. php artisan config:clear
6. you are good to go!
Example 3: how to start composer in laravel project on localhost
php artisan serve
// The original answer is:
/*
The full command works like this:
php artisan serve --host=<host IP address> --port=<port to use>
php artisan serve --host=127.0.0.1 --port=8080
*/
Example 4: how to host laravel project on local server
// command to host laravel project on local machine
//php artitan serve --host=your ip address --port=select port
php artisan serve --host=195.154.12.125 --port=8001