PHP code example of maherremita / laravel-dev

1. Go to this page and download the library: Download maherremita/laravel-dev 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/ */

    

maherremita / laravel-dev example snippets


'commands' => [
    // Simple format
    'Laravel Server' => 'php artisan serve',
    'Queue Worker' => 'php artisan queue:work',
    // Advanced format with custom colors
    'Vite Dev Server' => [
        'command' => 'npm run dev --watch',
        'colors' => [
            'text' => 'Green',
            'background' => 'Black'
        ]
    ],
],

'dynamic_commands' => [
    'colored_commands' => 'array_reduce(
        range(1, 3),
        function ($carry, $number) {
            $carry["Task {$number}"] = [
                "command" => "echo Executing task {$number}",
                "colors" => ["text" => "green", "background" => "black"]
            ];
            return $carry;
        },
        []
    );',
    // ...
]
bash
php artisan vendor:publish --provider="maherremita\LaravelDev\LaravelDevServiceProvider" --tag="config"
bash
php artisan dev