PHP code example of rodrixcornell / apigenerate

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

    

rodrixcornell / apigenerate example snippets


// app/Providers/AppServiceProvider.php
public function register()
{
	if ($this->app->environment() !== 'production') {
		$this->app->register(\Rodrixcornell\ApiGenerate\ApiGenerateServiceProvider::class);
	}
}

php artisan api:generate --con=conection_name

php artisan api:generate --table=table_name --relation=true

php artisan api:generate --table=table_name --route=my-custom-route --relation=true

php artisan api:generate --table=table_name --route=my-custom-route --module=Exemple --relation=true