Giter Club home page Giter Club logo

pretty-routes's Introduction

Pretty Routes for Laravel

Visualise your routes in pretty format.

Pretty Routes

Installation

composer require garygreen/pretty-routes

If your using autodiscovery in Laravel, it should just work.

Otherwise - add to your config/app.php providers array to where all your package providers are (before your app's providers):

PrettyRoutes\ServiceProvider::class,

By default the package exposes a /routes url. If you wish to configure this, publish the config.

php artisan vendor:publish --provider="PrettyRoutes\ServiceProvider"

If accessing /routes isn't working, ensure that you've included the provider within the same area as all your package providers (before all your app's providers) to ensure it takes priority.

By default pretty routes only enables itself when APP_DEBUG env is true. You can configure this on the published config as above, or add any custom middlewares.

pretty-routes's People

Contributors

anandiamy avatar antonioribeiro avatar atmonshi avatar bcleverly avatar borisdamevin avatar casperlaitw avatar deejavu avatar dpslwk avatar foo99 avatar garygreen avatar hosmelq avatar laravel-shift avatar lloricode avatar neptunedesign avatar renedekat avatar ridaamirini avatar tvbeek avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pretty-routes's Issues

Call to undefined method PrettyRoutes\PrettyRoutesController::getMiddleware()

I am using laravel 5.2, Installed the package,

Put the PrettyRoutes\ServiceProvider::class, above app server providers
and visited /routes and its showing me

FatalThrowableError in ControllerDispatcher.php line 110:
Call to undefined method PrettyRoutes\PrettyRoutesController::getMiddleware()

Whats missing ?

Want to contribute, don't know how to proceed...

Hi, I have an idea which I want to try out (and create a pull-request afterwards maybe). But I'm not sure, how to do this. If I fork your project, how can I get it into another Laravel project to see my changes in action? Do I have to put it to packagists? Please help me out? :)

A few remarks

A few remarks:

  • Don't require laravel/framework, composer warns about it, you would not want to end up with 2 installations of the framework. Require laravel/support instead. Or neither, since it wouldn't make sense running it outside Laravel.
  • Although it works, you package namespace lacks a vendor. For example, Laravel's components are Illuminate\Auth or Illuminate\Database. This allows for the existence of other Auth and Database classes next to each other. Instead of a Vendor\Package\Class namespace, you have a Package\Class namespace. Better would be something like GaryGreen\PrettyRoutes_Classname_
  • Why do you use middleware to overrule a request instead of providing a route and controller? With a route, a user could add additional middleware (such as authorization, I don't want everyone to see the routes).
  • If you use something like StyleCI with the Laravel preset, your code will be styled the same as the Laravel codebase, which looks pretty.

Unable to remove package

I am using deployhq.com for deploying my laravel website. When executing php artisan down an error happens.
[Symfony\Component\Debug\Exception\FatalThrowableError]
Class 'PrettyRoutes\ServiceProvider' not found

Vendor Publish Error

Using Laravel Framework 7.17.2
when i run: php artisan vendor:publish --provider="PrettyRoutes\ServiceProvider"
it's show error message "Unable to locate publishable resources."

New Feature request

Sorry , i just wanted request new feature . could you please add grouped routes.
for example.. all oauth related routes will be something like this.

Oauth Routes-
'oauth/authorize'   '\Laravel\Passport\Http\Controllers\AuthorizationController@authorize'
'oauth/authorize'     '\Laravel\Passport\Http\Controllers\ApproveAuthorizationController@approve'

User Routes-
'user'                         'UserController@registerUser' 

and etc. so we can easily scan through this. now i'm getting 100 of routes in this page. not very friendly

Not supported on lumen

Hi,

Installed this package on lumen. Do you have any plan to make this package can be support on lumen ?
Error that I get about router. Router laravel and lumen quite different .. need to enhance if want support on lumen too.

image

image

Class Auth\LoginController does not exist

Receiving this error when trying to view the pretty-routes view.

Class Auth\LoginController does not exist (View: /home/vagrant/project/vendor/garygreen/pretty-routes/views/routes.blade.php)

Tracks back to this file views/routes.blade.php in this package:

<?php echo e(implode(', ', array_map($middlewareClosure, array_merge($route->middleware(), $route->controllerMiddleware())))); ?>

Seems to be caused by a group having middleware applied to it.

For example:

Route::prefix('submit')->middleware('auth')->group(function () {
    Route::get('/', 'SubmitController@showSubmit')->name('submit');
});

Running Laravel 5.5.24, fresh install of this package.

Route groups

I'd like to have route groups. Have you thought about that yet?
Is anybody else working on that? Maybe I can read through the code and try to make it happen.

Add cookie to response exception

I have tried to use pretty routes with PyroCMS. It's almost native Laravel and other soft for Laravel works fine with it.

I have caught an exception:

Please, rename file to .html and open in browser.

How to use it

Ok, it is installed but I am not sure how to use it.

Problem with controllerMiddleware()

I am having this exception while visiting /routes:

Call to protected method Illuminate\Routing\Route::controllerMiddleware() from context 'Illuminate\View\Engines\PhpEngine'

This problem is ocurring because controllerMiddleware is a protected method and is being called out of context in routes.blade.php view file on line 66.

Filter column

Please add some inputs to filter methods, paths, names etc.
Also it will be pleasant to add group filtering or maybe filtering by maps (api map, admin map, web map etc.)
Sorry for my english

Doesn't work at all

I've followed the installation instructions, but nothing happens (composer goes through fine, I've added the entry to the providers array).
I don't think the package itself is getting registered with laravel (as a test I put a simple Log command which never gets called in any of the code relating to this).
When I run the vendor publish command, nothing happens (ie gives message: Nothing to publish for tag [].)
Am I missing something?
EDIT: using Laravel 5.1

Error on fresh install

Not sure why this is happening but I get this error when I hit the /routes route:

Undefined index: OPTIONS (View: /application/vendor/garygreen/pretty-routes/views/routes.blade.php)

I'm running Laravel 5.8.*

Could not find package garygreen/pretty-routes at any version for your minimum-stability (stable). Check the package spelling or your minimum-stability

I get InvalidArgumentException error when I run composer require garygreen/pretty-routes.

โžœ  pyrocms php artisan -V
Laravel Framework version 5.1.43 (LTS)

โžœ  pyrocms composer require garygreen/pretty-routes


 [InvalidArgumentException]
  Could not find package garygreen/pretty-routes at any version for your minimum-stability (stable). Check the package spelling or your minimum-stability


require [--dev] [--prefer-source] [--prefer-dist] [--no-progress] [--no-update] [--update-no-dev] [--update-with-dependencies] [--ignore-platform-reqs] [--sort-packages] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--] [<packages>]...

Feature request: show file where route is defined

With a lot of routes, it would be handy to be able to easily see where a route is defined. I'm not sure if that's possible in this package, but if so it'd be pretty slick. The screen would be pretty cluttered as is, so perhaps a tooltip/title tag to display this would make sense.

If you think this is a good idea, and can point me in the right direction, I'd be happy to take a crack at a PR for it.

Call to undefined function array_get()

So I just wanted to test this package with Laravel 6 and stumbled upon this error

Call to undefined function array_get()

And since your last commit says "Add support for Laravel 6" then I assume this a bug that needs fixing

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.