Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/grimbees/docrouter
Documentation Router for Laravel
https://github.com/grimbees/docrouter
annotation controller discovery-interface documentation laravel5 router
Last synced: about 2 months ago
JSON representation
Documentation Router for Laravel
- Host: GitHub
- URL: https://github.com/grimbees/docrouter
- Owner: grimbees
- Created: 2018-12-08T13:11:42.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2018-12-11T12:58:00.000Z (about 6 years ago)
- Last Synced: 2024-11-15T07:42:11.862Z (3 months ago)
- Topics: annotation, controller, discovery-interface, documentation, laravel5, router
- Language: PHP
- Homepage: https://packagist.org/packages/grimbees/docrouter
- Size: 2.93 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Documentation Router for Laravel
Allow routing on controller class and method documentation
To install on laravel root directory terminal type
**composer require grimbees/docrouter**Supported annotation on controller class:
**@middleware values**, values would be any middleware that is registered
**@prefix values**, values would be any url escaped stringSupported annotation on controller method:
**@method values**, values would be **any, post, get**
**@route values**, values would be any url escaped stringTo get started:
Add **GrimBees\DocRouter\DocRouterServiceProvider::class** to **config/app.php** on **$providers**Example: **MyController.php**
```php
namespace App\Http\Controllers;/**
* Class MyController
* @middleware web
* @prefix my
*/
class MyController extends Controller
{/**
* @method any
* @route test
*/
public function test() {
return "test";
}}
```
Type **composer dump-autoload** is required for new controllerTest controller method will be exposed on _/my/test_