PHP code example of juststeveking / laravel-api-toolkit

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

    

juststeveking / laravel-api-toolkit example snippets


return [
    'resource_name' => '%sResource',
    'policy_name' => '%sPolicy',
    'seeder_name' => '%sSeeder',
    'controllers' => [
        [
            'name' => 'IndexController',
            'options' => [
                '--invokable',
            ]
        ],
        [
            'name' => 'CreateController',
            'options' => [
                '--invokable',
            ]
        ],
        [
            'name' => 'ShowController',
            'options' => [
                '--invokable',
            ]
        ],
        [
            'name' => 'UpdateController',
            'options' => [
                '--invokable',
            ]
        ],
        [
            'name' => 'DeleteController',
            'options' => [
                '--invokable',
            ]
        ],
    ],
    'form_requests' => [
        'CreateRequest',
        'UpdateRequest',
    ],
];
bash
php artisan vendor:publish --provider="JustSteveKing\Laravel\ApiToolkit\ApiToolkitServiceProvider" --tag="config"
bash
php artisan api-toolkit:resource Post