PHP code example of aariow / artisan-api

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

    

aariow / artisan-api example snippets


return [
    ...,

    'forbidden-routes' => [
        'clear-compiled',
        'tinker',
        'up',
        'down',
        'serve',
        'completion',
        '_complete',
        'db*', // all `db:seed` and `db:wipe` will be inaccessible
        '*publish' // like `vendor:publish`
    ]
];

return [
    ...
    'api' => [
        'prefix' => "/artisan/api",
        'method'    => 'POST', // or ['POST', 'PUT']
    ],
    ...
];

return [
    ...
    'auto-run' => false,
    ...
];
shell
php artisan command:subcommand value1 value2 --opt1=value1 --opt2
shell
php artisan list
shell
php artisan cache:forget myCachedKeyName
shell
php artisan optimize:clear -v