PHP code example of oxycoder / laravel-apidoc-generator

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

    

oxycoder / laravel-apidoc-generator example snippets


Oxycoder\ApiDoc\ApiDocGeneratorServiceProvider::class,

// API Group Routes
Route::group(array('prefix' => 'api/v1', 'middleware' => []), function () {
	// Custom route added to standard Resource
	Route::get('example/foo', 'ExampleController@foo');
	// Standard Resource route
	Route::resource('example', 'ExampleController');
});

/**
 * @resource Example
 *
 * Longer description
 */
class ExampleController extends Controller {

	/**
	 * This is the short description [and should be unique as anchor tags link to this in navigation menu]
	 *
	 * This can be an optional longer description of your API call, used within the documentation.
	 *
	 */
	 public function foo(){

	 }

public function rules()
{
    return [
        'title' => 'r',
        'thumbnail' => '

$validatedData = $request->validate([
    'title' => '
    'thumbnail' => '

/**
 * @transformer \Mpociot\ApiDoc\Tests\Fixtures\TestTransformer
 */
public function transformerTag()
{
    return '';
}

/**
 * @transformercollection \Mpociot\ApiDoc\Tests\Fixtures\TestTransformer
 */
public function transformerCollectionTag()
{
    return '';
}

/**
 * @response {
 *  data: [],
 *}
 */
public function responseTag()
{
    return '';
}

'url' => env('APP_URL', 'http://yourappdefault.app'),
sh
php artisan api:generate --routePrefix="api/v1/*"
sh
 php artisan vendor:publish
 
sh
php artisan api:generate --routePrefix="api/*" --actAsUserId=1
sh
php artisan api:generate --routePrefix="api/*" --noResponseCalls
sh
php artisan api:update