PHP code example of martianatowrk / laravel-json-api-generator
1. Go to this page and download the library: Download martianatowrk/laravel-json-api-generator 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/ */
martianatowrk / laravel-json-api-generator example snippets
// ...
'providers' => [
/*
* Package Service Providers...
*/
MartianAtWork\Coders\CodersServiceProvider::class,
],
// ...
public function register()
{
if ($this->app->environment() == 'local') {
$this->app->register(\MartianAtWork\Coders\CodersServiceProvider::class);
}
}
shell
php artisan vendor:publish --tag=MartianAtWork-models
php artisan config:clear
shell
php artisan code:models
shell
php artisan code:models --table=users
shell
php artisan code:models --connection=mysql
shell
php artisan code:models --schema=shop