PHP code example of ajaydhakal / laravel-host

1. Go to this page and download the library: Download ajaydhakal/laravel-host library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

ajaydhakal / laravel-host example snippets


return [
    'host' => env('LARAVEL_HOST_ADDRESS', '0.0.0.0'),
    'port' => env('LARAVEL_HOST_PORT', 8000),
    'allow_production' => env('LARAVEL_HOST_ALLOW_PRODUCTION', false),
];
bash
php artisan host
bash
php artisan host --port=8080
bash
php artisan host --host=0.0.0.0 --port=8080
bash
php artisan host --force
bash
php artisan vendor:publish --tag=laravel-host-config