PHP code example of lukepolo / laravel-api-migrations

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

    

lukepolo / laravel-api-migrations example snippets


    [
        'firstname' => 'Dwight',
        'lastname'  => 'Schrute',
        'title'     => 'Assistant to the Regional Manager'
    ]

    [
        'firstname' => 'Dwight',
        'lastname'  => 'Schrute',
        'title'     => 'Assistant to the Regional Manager',
        'secret_title' => 'Assistant Regional Manager',
    ]

'providers' => [
    ...
    \LukePOLO\LaravelApiMigrations\ServiceProvider::class,
]

'aliases' => [
    ...
    'LaravelApiMigrations' => \LukePOLO\LaravelApiMigrations\Facades\LaravelApiMigrations::class,
]

protected $middlewareGroups = [
    'api' => [
        ...
        \LukePOLO\LaravelApiMigrations\LaravelApiMigrationsMiddleware::class,
    ];
]

    'current_versions' => [
        'V1' => '2017-01-31',
    ],
bash
php artisan vendor:publish --provider="LukePOLO\LaravelApiMigrations\ServiceProvider" --tag=config
shell
php artisan make:api-release
shell
php artisan make:api-migration ExampleMigration
shell
php artisan cache:api-migrations

    'Api-Version' : '2017-08-31'  
bash
php artisan vendor:publish --provider="LukePOLO\LaravelApiMigrations\ServiceProvider" --tag=migrations