Dawnki / laroute by Dawnki

Auto generate Laravel router's statement by phpdoc
19
0
2
Package Data
Maintainer Username: Dawnki
Maintainer Contact: dawnkichow@outlook.com (Dawnki)
Package Create Date: 2017-09-10
Package Last Update: 2017-09-11
Language: PHP
License: MIT
Last Refreshed: 2025-02-06 03:07:07
Package Statistics
Total Downloads: 19
Monthly Downloads: 0
Daily Downloads: 0
Total Stars: 0
Total Watchers: 2
Total Forks: 0
Total Open Issues: 0

laroute

Auto generate Laravel router's statement by phpdoc

Usage

1.Import the vendor

composer require dawnki/laroute dev-master

2.write the phpdoc in Laravel controller

class TestController {
    /**
     *  @method GET
     *  @route  /test
     */
    function test()
    {
        // your code
    }
}

3.call the generator to get the route statements

    $generator =  new \dawnki\laroute\Generate();
    $generator->getOne(\App\Http\Controller\TestController::class)->display();

it will be export that:

Route::get('/test',['uses'=>'TestController@test']);
...
...

and copy these route statements to route

Todo

  • Directly export the statements to route file
  • Support multi files(controllers)

License

MIT