2017 © Pedro Peláez
 

laravel-plugin laravel-routes

Documentation of Laravel Routes

image

gussrw/laravel-routes

Documentation of Laravel Routes

  • Friday, April 27, 2018
  • by GussRw
  • Repository
  • 2 Watchers
  • 4 Stars
  • 27 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 8 Versions
  • 35 % Grown

The README.md

Documentation of Laravel Routes

This project generates a documentation for your routes of a laravel project, generates a html file with the description for each route, description include:, (*1)

  • Method
  • Uri
  • Name
  • Controller
  • Middleware

All this with a simple artisan command., (*2)

Installation

This package can be installed with composer with the next command:, (*3)

composer require gussrw/laravel-routes, (*4)

Generate HTML file

You can generate the html file from console with the next artisan command., (*5)

php artisan route:docs, (*6)

This command create a html file in Project/docs., (*7)

Route description

Description are optional, but if you want to add them create a php comment over the each route in the web.php file with @description., (*8)

/**
 * @description Show the home page of the site
 */
Route::get('/home', 'HomeController@index') -> name('home.index');

Resources routes

The descriptions in the resource type routes are identified by their method in the controller., (*9)

/**
 * @index Show the main view
 * @create Show the view to create a photo
 * @store Save a photo in database
 * @edit Show the view to edit a photo
 * @update Update photo data in database
 * @destroy Delete a photo in database
 */
Route::resource('photos', 'PhotoController');

Params

Routes params are defined with @param name Description, you can use @param in resource type routes., (*10)

/**
 * @description Download photo with the photo id.
 * @param id ID of the photo in database
 */
Route::get('/photo/{id}/download', 'PhotoController@download');

Options

Lang

To show the documentation in another language, you can use option --lang , default is en, (*11)

php artisan route:docs --lang=es, (*12)

Languages ​​currently available:, (*13)

  • en set to english
  • es set to spanish

Path

To indicate the html file path, you can use option --path , default is /docs, (*14)

php artisan route:docs --path=/routes/docs, (*15)

Commented

To show only the routes that have a comment, you can use the option --commented , default is false, (*16)

php artisan route:docs --commented=true, (*17)

Sort By

To sort the routes by some property, you can use the option --sortby ,default is uri, (*18)

php artisan route:docs --sortby=name, (*19)

Properties available to order:, (*20)

  • method
  • uri
  • name
  • action
  • middleware
  • comment

The Versions

27/04 2018

dev-master

9999999-dev

Documentation of Laravel Routes

  Sources   Download

proprietary

by Avatar GussRw

27/04 2018

1.1.0

1.1.0.0

Documentation of Laravel Routes

  Sources   Download

proprietary

by Avatar GussRw

18/04 2018

1.0.9

1.0.9.0

Documentation of Laravel Routes

  Sources   Download

proprietary

by Avatar GussRw

16/04 2018

1.0.8

1.0.8.0

Documentation of Laravel Routes

  Sources   Download

proprietary

by Avatar GussRw

14/04 2018

1.0.7

1.0.7.0

Documentation of Laravel Routes

  Sources   Download

proprietary

by Avatar GussRw

14/04 2018

1.0.6

1.0.6.0

Documentation of Laravel Routes

  Sources   Download

proprietary

by Avatar GussRw

14/04 2018

1.0.5

1.0.5.0

Documentation of Laravel Routes

  Sources   Download

proprietary

by Avatar GussRw

13/04 2018

1.0.0

1.0.0.0

Documentation of Laravel Routes

  Sources   Download

proprietary

by Avatar GussRw