thedragoncode / pretty-routes Goto Github PK
View Code? Open in Web Editor NEWThis project forked from garygreen/pretty-routes
Pretty routes for Laravel Framework
License: MIT License
This project forked from garygreen/pretty-routes
Pretty routes for Laravel Framework
License: MIT License
Now the list of routes is generated in a native way.
Replace it with AJAX request for faster page rendering.
I have problem to setup this package.
Can I show routes for API?
its giving error this error:
DragonCode\LaravelRoutesCore\Models\Route::getResponse(): Return value must be of type ?array, DragonCode\LaravelRoutesCore\Models\Tags\Returns returned
Screenshot attached: https://imgur.com/XlpbjIO
"phpdocumentor/type-resolver": "^1.1.0"
Request failed with status code 500
{
"message": "A type is missing after a type separator",
"exception": "RuntimeException",
"file": "path/vendor/phpdocumentor/type-resolver/src/TypeResolver.php",
"line": 273,
"trace": [
{
"file": "path/vendor/phpdocumentor/type-resolver/src/TypeResolver.php",
"line": 155,
"function": "parseTypes",
"class": "phpDocumentor\Reflection\TypeResolver",
"type": "->"
},
{
"file": "path/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Return_.php",
"line": 46,
"function": "resolve",
"class": "phpDocumentor\Reflection\TypeResolver",
"type": "->"
},
{
"file": "path/vendor/phpdocumentor/reflection-docblock/src/DocBlock/StandardTagFactory.php",
"line": 216,
"function": "create",
"class": "phpDocumentor\Reflection\DocBlock\Tags\Return_",
"type": "::"
},
{
"file": "path/vendor/phpdocumentor/reflection-docblock/src/DocBlock/StandardTagFactory.php",
"line": 148,
"function": "createTag",
"class": "phpDocumentor\Reflection\DocBlock\StandardTagFactory",
"type": "->"
},
{
"file": "path/vendor/phpdocumentor/reflection-docblock/src/DocBlockFactory.php",
"line": 244,
"function": "create",
"class": "phpDocumentor\Reflection\DocBlock\StandardTagFactory",
"type": "->"
},
{
"file": "path/vendor/phpdocumentor/reflection-docblock/src/DocBlockFactory.php",
"line": 104,
"function": "parseTagBlock",
"class": "phpDocumentor\Reflection\DocBlockFactory",
"type": "->"
},
{
"file": "path/vendor/andrey-helldar/laravel-routes-core/src/Models/Reader.php",
"line": 63,
"function": "create",
"class": "phpDocumentor\Reflection\DocBlockFactory",
"type": "->"
},
{
"file": "path/vendor/andrey-helldar/laravel-routes-core/src/Models/Reader.php",
"line": 51,
"function": "get",
"class": "Helldar\LaravelRoutesCore\Models\Reader",
"type": "->"
},
{
"file": "path/vendor/andrey-helldar/laravel-routes-core/src/Support/Annotation.php",
"line": 112,
"function": "forMethod",
"class": "Helldar\LaravelRoutesCore\Models\Reader",
"type": "->"
},
{
"file": "path/vendor/andrey-helldar/laravel-routes-core/src/Support/Annotation.php",
"line": 106,
"function": "getValue",
"class": "Helldar\LaravelRoutesCore\Support\Annotation",
"type": "->"
},
{
"file": "path/vendor/andrey-helldar/laravel-routes-core/src/Support/Annotation.php",
"line": 48,
"function": "get",
"class": "Helldar\LaravelRoutesCore\Support\Annotation",
"type": "->"
},
{
"file": "path/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php",
"line": 261,
"function": "isDeprecated",
"class": "Helldar\LaravelRoutesCore\Support\Annotation",
"type": "->"
},
{
"file": "path/vendor/andrey-helldar/laravel-routes-core/src/Models/Route.php",
"line": 170,
"function": "__callStatic",
"class": "Illuminate\Support\Facades\Facade",
"type": "::"
},
{
"file": "path/vendor/andrey-helldar/laravel-routes-core/src/Models/Route.php",
"line": 204,
"function": "getDeprecated",
"class": "Helldar\LaravelRoutesCore\Models\Route",
"type": "->"
},
{
"file": "path/vendor/laravel/framework/src/Illuminate/Collections/Traits/EnumeratesValues.php",
"line": 833,
"function": "toArray",
"class": "Helldar\LaravelRoutesCore\Models\Route",
"type": "->"
},
{
"function": "Illuminate\Support\Traits\{closure}",
"class": "Illuminate\Support\Collection",
"type": "->"
},
{
"file": "path/vendor/laravel/framework/src/Illuminate/Collections/Collection.php",
"line": 640,
"function": "array_map"
},
{
"file": "path/vendor/laravel/framework/src/Illuminate/Collections/Traits/EnumeratesValues.php",
"line": 834,
"function": "map",
"class": "Illuminate\Support\Collection",
"type": "->"
},
{
"file": "path/vendor/andrey-helldar/laravel-routes-core/src/Support/Routes.php",
"line": 49,
"function": "toArray",
"class": "Illuminate\Support\Collection",
"type": "->"
},
{
"file": "path/vendor/andrey-helldar/pretty-routes/src/Http/PrettyRoutesController.php",
"line": 37,
"function": "get",
"class": "Helldar\LaravelRoutesCore\Support\Routes",
"type": "->"
},
{
"file": "path/vendor/laravel/framework/src/Illuminate/Routing/Controller.php",
"line": 54,
"function": "routes",
"class": "PrettyRoutes\Http\PrettyRoutesController",
"type": "->"
},
{
"file": "path/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php",
"line": 45,
"function": "callAction",
"class": "Illuminate\Routing\Controller",
"type": "->"
},
{
"file": "path/vendor/laravel/framework/src/Illuminate/Routing/Route.php",
"line": 254,
"function": "dispatch",
"class": "Illuminate\Routing\ControllerDispatcher",
"type": "->"
},
{
"file": "path/vendor/laravel/framework/src/Illuminate/Routing/Route.php",
"line": 197,
"function": "runController",
"class": "Illuminate\Routing\Route",
"type": "->"
},
{
"file": "path/vendor/laravel/framework/src/Illuminate/Routing/Router.php",
"line": 693,
"function": "run",
"class": "Illuminate\Routing\Route",
"type": "->"
},
{
"file": "path/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
"line": 128,
"function": "Illuminate\Routing\{closure}",
"class": "Illuminate\Routing\Router",
"type": "->"
},
{
"file": "path/platform/packages/api/src/Http/Middleware/ForceJsonResponseMiddleware.php",
"line": 21,
"function": "Illuminate\Pipeline\{closure}",
"class": "Illuminate\Pipeline\Pipeline",
"type": "->"
},
{
"file": "path/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
"line": 167,
"function": "handle",
"class": "Simtabi\Api\Http\Middleware\ForceJsonResponseMiddleware",
"type": "->"
},
{
"file": "path/vendor/laravel/framework/src/Illuminate/Routing/Middleware/SubstituteBindings.php",
"line": 50,
"function": "Illuminate\Pipeline\{closure}",
"class": "Illuminate\Pipeline\Pipeline",
"type": "->"
},
{
"file": "path/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
"line": 167,
"function": "handle",
"class": "Illuminate\Routing\Middleware\SubstituteBindings",
"type": "->"
},
{
"file": "path/vendor/laravel/framework/src/Illuminate/Routing/Middleware/ThrottleRequests.php",
"line": 127,
"function": "Illuminate\Pipeline\{closure}",
"class": "Illuminate\Pipeline\Pipeline",
"type": "->"
},
{
"file": "path/vendor/laravel/framework/src/Illuminate/Routing/Middleware/ThrottleRequests.php",
"line": 103,
"function": "handleRequest",
"class": "Illuminate\Routing\Middleware\ThrottleRequests",
"type": "->"
},
{
"file": "path/vendor/laravel/framework/src/Illuminate/Routing/Middleware/ThrottleRequests.php",
"line": 55,
"function": "handleRequestUsingNamedLimiter",
"class": "Illuminate\Routing\Middleware\ThrottleRequests",
"type": "->"
},
{
"file": "path/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
"line": 167,
"function": "handle",
"class": "Illuminate\Routing\Middleware\ThrottleRequests",
"type": "->"
},
{
"file": "path/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
"line": 103,
"function": "Illuminate\Pipeline\{closure}",
"class": "Illuminate\Pipeline\Pipeline",
"type": "->"
},
{
"file": "path/vendor/laravel/framework/src/Illuminate/Routing/Router.php",
"line": 695,
"function": "then",
"class": "Illuminate\Pipeline\Pipeline",
"type": "->"
},
{
"file": "path/vendor/laravel/framework/src/Illuminate/Routing/Router.php",
"line": 670,
"function": "runRouteWithinStack",
"class": "Illuminate\Routing\Router",
"type": "->"
},
{
"file": "path/vendor/laravel/framework/src/Illuminate/Routing/Router.php",
"line": 636,
"function": "runRoute",
"class": "Illuminate\Routing\Router",
"type": "->"
},
{
"file": "path/vendor/laravel/framework/src/Illuminate/Routing/Router.php",
"line": 625,
"function": "dispatchToRoute",
"class": "Illuminate\Routing\Router",
"type": "->"
},
{
"file": "path/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php",
"line": 166,
"function": "dispatch",
"class": "Illuminate\Routing\Router",
"type": "->"
},
{
"file": "path/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
"line": 128,
"function": "Illuminate\Foundation\Http\{closure}",
"class": "Illuminate\Foundation\Http\Kernel",
"type": "->"
},
{
"file": "path/platform/core/js-validation/src/RemoteValidationMiddleware.php",
"line": 61,
"function": "Illuminate\Pipeline\{closure}",
"class": "Illuminate\Pipeline\Pipeline",
"type": "->"
},
{
"file": "path/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
"line": 167,
"function": "handle",
"class": "Simtabi\JsValidation\RemoteValidationMiddleware",
"type": "->"
},
{
"file": "path/vendor/barryvdh/laravel-debugbar/src/Middleware/InjectDebugbar.php",
"line": 67,
"function": "Illuminate\Pipeline\{closure}",
"class": "Illuminate\Pipeline\Pipeline",
"type": "->"
},
{
"file": "path/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
"line": 167,
"function": "handle",
"class": "Barryvdh\Debugbar\Middleware\InjectDebugbar",
"type": "->"
},
{
"file": "path/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php",
"line": 21,
"function": "Illuminate\Pipeline\{closure}",
"class": "Illuminate\Pipeline\Pipeline",
"type": "->"
},
{
"file": "path/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
"line": 167,
"function": "handle",
"class": "Illuminate\Foundation\Http\Middleware\TransformsRequest",
"type": "->"
},
{
"file": "path/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php",
"line": 21,
"function": "Illuminate\Pipeline\{closure}",
"class": "Illuminate\Pipeline\Pipeline",
"type": "->"
},
{
"file": "path/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
"line": 167,
"function": "handle",
"class": "Illuminate\Foundation\Http\Middleware\TransformsRequest",
"type": "->"
},
{
"file": "path/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ValidatePostSize.php",
"line": 27,
"function": "Illuminate\Pipeline\{closure}",
"class": "Illuminate\Pipeline\Pipeline",
"type": "->"
},
{
"file": "path/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
"line": 167,
"function": "handle",
"class": "Illuminate\Foundation\Http\Middleware\ValidatePostSize",
"type": "->"
},
{
"file": "path/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/PreventRequestsDuringMaintenance.php",
"line": 86,
"function": "Illuminate\Pipeline\{closure}",
"class": "Illuminate\Pipeline\Pipeline",
"type": "->"
},
{
"file": "path/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
"line": 167,
"function": "handle",
"class": "Illuminate\Foundation\Http\Middleware\PreventRequestsDuringMaintenance",
"type": "->"
},
{
"file": "path/vendor/fruitcake/laravel-cors/src/HandleCors.php",
"line": 37,
"function": "Illuminate\Pipeline\{closure}",
"class": "Illuminate\Pipeline\Pipeline",
"type": "->"
},
{
"file": "path/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
"line": 167,
"function": "handle",
"class": "Fruitcake\Cors\HandleCors",
"type": "->"
},
{
"file": "path/vendor/fideloper/proxy/src/TrustProxies.php",
"line": 57,
"function": "Illuminate\Pipeline\{closure}",
"class": "Illuminate\Pipeline\Pipeline",
"type": "->"
},
{
"file": "path/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
"line": 167,
"function": "handle",
"class": "Fideloper\Proxy\TrustProxies",
"type": "->"
},
{
"file": "path/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
"line": 103,
"function": "Illuminate\Pipeline\{closure}",
"class": "Illuminate\Pipeline\Pipeline",
"type": "->"
},
{
"file": "path/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php",
"line": 141,
"function": "then",
"class": "Illuminate\Pipeline\Pipeline",
"type": "->"
},
{
"file": "path/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php",
"line": 110,
"function": "sendRequestThroughRouter",
"class": "Illuminate\Foundation\Http\Kernel",
"type": "->"
},
{
"file": "path/public/index.php",
"line": 52,
"function": "handle",
"class": "Illuminate\Foundation\Http\Kernel",
"type": "->"
}
]
}
laravel 6
Argument 1 passed to Helldar\LaravelRoutesCore\Support\Annotation::Helldar\LaravelRoutesCore\Support{closure}() must be an instance of phpDocumentor\Reflection\DocBlock\Tags\Return_, instance of phpDocumentor\Reflection\DocBlock\Tags\InvalidTag given
{
"message": "Argument 1 passed to Helldar\LaravelRoutesCore\Support\Annotation::Helldar\LaravelRoutesCore\Support\{closure}() must be an instance of phpDocumentor\Reflection\DocBlock\Tags\Return_, instance of phpDocumentor\Reflection\DocBlock\Tags\InvalidTag given",
"exception": "Symfony\Component\Debug\Exception\FatalThrowableError",
"file": "C:\OSPanel\domains\localhost\vendor\andrey-helldar\laravel-routes-core\src\Support\Annotation.php",
"line": 89,
"trace": [
{
"function": "Helldar\LaravelRoutesCore\Support\{closure}",
"class": "Helldar\LaravelRoutesCore\Support\Annotation",
"type": "::"
},
{
"file": "C:\OSPanel\domains\localhost\vendor\andrey-helldar\laravel-routes-core\src\Support\Annotation.php",
"line": 91,
"function": "array_map"
},
......
Can't install
$ composer require dragon-code/pretty-routes -W
Info from https://repo.packagist.org: #StandWithUkraine
Using version ^3.2 for dragon-code/pretty-routes
./composer.json has been updated
Running composer update dragon-code/pretty-routes --with-all-dependencies
Loading composer repositories with package information
Info from https://repo.packagist.org: #StandWithUkraine
Updating dependencies
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Root composer.json requires laravel/framework ^8.40, found laravel/framework[v8.40.0, ..., 8.x-dev] but these were not loaded, likely because it conflicts with another require.
Problem 2
- laravel/tinker is locked to version v2.6.1 and an update of this package was not requested.
- laravel/tinker v2.6.1 requires illuminate/console ^6.0|^7.0|^8.0 -> found illuminate/console[v6.0.0, ..., 6.x-dev, v7.0.0, ..., 7.x-dev, v8.0.0, ..., 8.x-dev] but these were not loaded, likely because it conflicts with another require.
Problem 3
- livewire/livewire is locked to version v2.5.5 and an update of this package was not requested.
- livewire/livewire v2.5.5 requires illuminate/validation ^7.0|^8.0 -> found illuminate/validation[v7.0.0, ..., 7.x-dev, v8.0.0, ..., 8.x-dev] but these were not loaded, likely because it conflicts with another require.
Problem 4
- spatie/laravel-permission is locked to version 5.1.0 and an update of this package was not requested.
- spatie/laravel-permission 5.1.0 requires illuminate/auth ^6.0|^7.0|^8.0 -> found illuminate/auth[v6.0.0, ..., 6.x-dev, v7.0.0, ..., 7.x-dev, v8.0.0, ..., 8.x-dev] but these were not loaded, likely because it conflicts with another require.
Problem 5
- laravel/sail is locked to version v1.9.0 and an update of this package was not requested.
- laravel/sail v1.9.0 requires illuminate/console ^8.0|^9.0 -> found illuminate/console[v8.0.0, ..., 8.x-dev, v9.0.0-beta.1, ..., 9.x-dev] but these were not loaded, likely because it conflicts with another require.
Installation failed, reverting ./composer.json and ./composer.lock to their original content.
Add the ability to quickly filter by click by method, module or middleware.
I get throttle exception after a little bit of playing with the UI. The project is pretty small with only a few routes.
Great package.
This is not issue.
the js file is not available on https://cdn.jsdelivr.net/gh/andrey-helldar/[email protected]/dist/app.js
I just replace the old package with the new one and the js file is not available on cdn jsdelivr
Request failed with status code 500
Argument 1 passed to Helldar\LaravelRoutesCore\Support\Annotation::Helldar\LaravelRoutesCore\Support{closure}() must be an instance of phpDocumentor\Reflection\DocBlock\Tags\Return_, instance of phpDocumentor\Reflection\DocBlock\Tags\InvalidTag given
Routes:
Route::prefix('glicemia')->name('glicemia.')->group(function () {
Route::get('generate-pdf', [GlicemiaController::class, 'pdfview'])->name('generate-pdf')->middleware('permission:glicemia.read');
Route::post('get', [GlicemiaController::class, 'getDataTables'])->name('get')->middleware('permission:glicemia.read');
Route::get('/', [GlicemiaController::class, 'index'])->name('index')->middleware('permission:glicemia.read');
Route::get('create', [GlicemiaController::class, 'create'])->name('create')->middleware('permission:glicemia.create');
Route::post('create', [GlicemiaController::class, 'store'])->name('store')->middleware('permission:glicemia.create');
Route::get('show/{glicemia}', [GlicemiaController::class, 'show'])->name('show')->middleware('permission:glicemia.read');
<-- HERE it throws the error -->
Route::get('edit/{glicemia}', [GlicemiaController::class, 'edit'])->name('edit')->middleware('permission:glicemia.update');
Route::patch('edit/{glicemia}', [GlicemiaController::class, 'update'])->name('update')->middleware('permission:glicemia.update');
Route::delete('destroy/{glicemia}', [GlicemiaController::class, 'destroy'])->name('destroy')->middleware('permission:glicemia.delete');
});
Even though i can access the routes and works as expected its throwing that error, is there anything i should look into?
Thanks
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.