PHP code example of usermp / artisan-api

1. Go to this page and download the library: Download usermp/artisan-api 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/ */

    

usermp / artisan-api example snippets


return [
    ...
     Usermp\ArtisanApi\ArtisanServiceProvider::class,
],
 
return [
    'with_key' => env('ARTISAN_WITH_KEY', false),
    'api_key'  => env('ARTISAN_API_KEY', 'YOUR KEY'),
    'allowed_commands' => [
        // General commands
        'list',
        'help',

        // Make commands
        'make:controller',
        'make:model',
        'make:migration',
        'make:seeder',
        'make:factory',
        'make:middleware',
        'make:request',
        'make:resource',
        'make:command',
        'make:event',
        'make:listener',
        'make:policy',
        'make:provider',
        'make:test',
        'make:job',
        'make:rule',
        'make:mail',
        'make:notification',

        // Migrations
        'migrate',
        'migrate:rollback',
        'migrate:refresh',
        'migrate:reset',
        'migrate:status',

        // Seeder
        'db:seed',
        'db:wipe',

        // Cache
        'cache:clear',
        'cache:forget',
        'config:clear',
        'config:cache',
        'route:cache',
        'route:clear',
        'view:cache',
        'view:clear',

        // Queue
        'queue:work',
        'queue:listen',
        'queue:restart',
        'queue:table',
        'queue:flush',

        // Maintenance
        'down',
        'up',

        // Others
        'optimize',
        'serve',
        'schedule:run',
        'schedule:work',

        // Add other commands as needed
    ],
];
bootstrap/providers.php
bash
php artisan vendor:publish --provider="Usermp\ArtisanApi\ArtisanServiceProvider" --tag="artisan-api-config"
config/artisanapi.php