PHP code example of diepxuan / laravel-support

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

    

diepxuan / laravel-support example snippets


protected $commands = [
    \Diepxuan\Support\Commands\Npm::class,
    \Diepxuan\Support\Commands\ServeDev::class,
    \Diepxuan\Support\Commands\ServeDevStop::class,
    \Diepxuan\Support\Commands\ServeDevStatus::class,
    \Diepxuan\Support\Commands\ServeDevHealth::class,
    \Diepxuan\Support\Commands\ServeDevService::class,
    \Diepxuan\Support\Commands\ServeDevLogs::class,
];

use Diepxuan\Support\Collection;

$collection = new Collection([['name' => 'John', 'age' => 30], ...]);
echo $collection->toMarkdownTable(['name' => 'Tên', 'age' => 'Tuổi']);
bash
php artisan app:dev:npm
bash
# Start development server
php artisan serve:dev

# Check status
php artisan serve:dev:status

# Health check with auto-fix
php artisan serve:dev:health --fix

# Install as systemd service
sudo php artisan serve:dev:service install

# Stop servers
php artisan serve:dev:stop