Copy ServeCommand.php
to app/Console/Commands/
folder and edit app/Console/Kernel.php
and put ServerCommand
, like this:
<?php
namespace App\Console;
use Illuminate\Console\Scheduling\Schedule;
use Laravel\Lumen\Console\Kernel as ConsoleKernel;
class Kernel extends ConsoleKernel
{
protected $commands = [
Commands\ServeCommand::class,
];
If you run the command:
php artisan serve
will start the local server based on APP_HOST
(from your .env
)
You can change the host or port:
php artisan serve --host 0.0.0.0 --port 8000