Pretty routes for Laravel

Overview

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.

Comments
  • A few remarks

    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.
    opened by Jeroen-G 10
  • Problem with controllerMiddleware()

    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.

    opened by jordankobellarz 6
  • Doesn't work at all

    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

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

    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>]...
    
    opened by shinokada 6
  • Feature request: show file where route is defined

    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.

    opened by tnorthcutt 4
  • Added dark mode

    Added dark mode

    • Updated bootstrap to 4.0.0 final version.
    • Added a new dark mode customizable in config file in order to care our eyes.
    • Added possibility to custom route name in config file.
    • Change "tag" css class to "badge".
    opened by gboquizosanchez 3
  • Add cookie to response exception

    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.

    opened by Piterden 3
  • Laravel 9.x Compatibility

    Laravel 9.x Compatibility

    This is an automated pull request from Shift to update your package code and dependencies to be compatible with Laravel 9.x.

    Before merging, you need to:

    • Checkout the l9-compatibility branch
    • Review all comments for additional changes
    • Thoroughly test your package

    If you do find an issue, please report it by commenting on this PR to help improve future automation.

    opened by laravel-shift 2
  • Added definition of deprecated methods and classes

    Added definition of deprecated methods and classes

    If an deprecated label is set on a method, only its line will be crossed out. If the deprecated label is set on the class, then all its methods will be crossed out.

    For example:

    namespace App\Http\Controllers\Api\V1\Master;
    
    /** @deprecated */
    class BookingServicesController
    {
      public function index()
      // ...
    }
    
    class BookingOrdersController
    {
      /**
       * @deprecated
       */
      public function items()
      // ...
    }
    

    Result: 2020-05-26_16-27-04

    opened by andrey-helldar 2
  • Want to contribute, don't know how to proceed...

    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? :)

    opened by pebbo 2
  • Fixed error in view caused when using Route::any

    Fixed error in view caused when using Route::any

    If you use Route::any A Route::options() Is created.

    Which will throw error in view file on Line number 57.

     @foreach (array_diff($route->methods(), config('pretty-routes.hide_methods')) as $method)
        <span class="tag tag-{{ $methodColours[$method] }}">{{ $method }}</span>
    @endforeach
    

    Because $methodColours doesn't have key for 'OPTIONS'.

    To solve that i've created 'OPTIONS' key which allots default class for tag coloration.

    opened by izshreyansh 1
  • Not supported on lumen

    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

    opened by mazfreelance 0
  • Additional Column to list View that is being returned from controller

    Additional Column to list View that is being returned from controller

    I am thinking of sending a PR which will add 1+ columns which will spit out view name that is being returned from the controller action.

    Could that be useful?

    opened by izshreyansh 4
  • Call to undefined method PrettyRoutes\PrettyRoutesController::getMiddleware()

    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 ?

    opened by shafikhaan 2
Owner
Gary Green
Gary Green
Laravel routes from Javascript

Laravel Javascript Routes Why? I love the Laravel 4 routing system and I often use named routes like route('users.show', array('id' => 1)) to generate

Fede Isas 63 Oct 10, 2022
View your Laravel routes on the browser.

View your Laravel routes on the browser. This package adds a route to your Laravel application. Once you've installed this package, enter /route-list

Patompong Savaengsuk 23 Oct 28, 2022
Declare routes inside Laravel Livewire components.

Convoy This package allows you to declare routes inside of your full page Laravel Livewire components. All you have to do is create a route method ins

null 17 Jul 27, 2022
List of 77 languages for Laravel Framework 4, 5, 6, 7 and 8, Laravel Jetstream , Laravel Fortify, Laravel Breeze, Laravel Cashier, Laravel Nova and Laravel Spark.

Laravel Lang In this repository, you can find the lang files for the Laravel Framework 4/5/6/7/8, Laravel Jetstream , Laravel Fortify, Laravel Cashier

Laravel Lang 6.9k Jan 2, 2023
⚡ Laravel Charts — Build charts using laravel. The laravel adapter for Chartisan.

What is laravel charts? Charts is a Laravel library used to create Charts using Chartisan. Chartisan does already have a PHP adapter. However, this li

Erik C. Forés 31 Dec 18, 2022
Laravel Kickstart is a Laravel starter configuration that helps you build Laravel websites faster.

Laravel Kickstart What is Laravel Kickstart? Laravel Kickstart is a Laravel starter configuration that helps you build Laravel websites faster. It com

Sam Rapaport 46 Oct 1, 2022
Laravel User Activity Log - a package for Laravel 8.x that provides easy to use features to log the activities of the users of your Laravel app

Laravel User Activity Log - a package for Laravel 8.x that provides easy to use features to log the activities of the users of your Laravel app

null 9 Dec 14, 2022
Laravel Segment is an opinionated, approach to integrating Segment into your Laravel application.

Laravel Segment Laravel Segment is an opinionated, approach to integrating Segment into your Laravel application. Installation You can install the pac

Octohook 13 May 16, 2022
Laravel Sanctum support for Laravel Lighthouse

Lighthouse Sanctum Add Laravel Sanctum support to Lighthouse Requirements Installation Usage Login Logout Register Email Verification Forgot Password

Daniël de Wit 43 Dec 21, 2022
Bring Laravel 8's cursor pagination to Laravel 6, 7

Laravel Cursor Paginate for laravel 6,7 Installation You can install the package via composer: composer require vanthao03596/laravel-cursor-paginate U

Pham Thao 9 Nov 10, 2022
A package that uses blade templates to control how markdown is converted to HTML inside Laravel, as well as providing support for markdown files to Laravel views.

Install Install via composer. $ composer require olliecodes/laravel-etched-blade Once installed you'll want to publish the config. $ php artisan vendo

Ollie Codes 19 Jul 5, 2021
A light weight laravel package that facilitates dealing with arabic concepts using a set of classes and methods to make laravel speaks arabic

A light weight laravel package that facilitates dealing with arabic concepts using a set of classes and methods to make laravel speaks arabic! concepts like , Hijri Dates & Arabic strings and so on ..

Adnane Kadri 49 Jun 22, 2022
Jetstrap is a lightweight laravel 8 package that focuses on the VIEW side of Jetstream / Breeze package installed in your Laravel application

A Laravel 8 package to easily switch TailwindCSS resources generated by Laravel Jetstream and Breeze to Bootstrap 4.

null 686 Dec 28, 2022
Laravel Jetstream is a beautifully designed application scaffolding for Laravel.

Laravel Jetstream is a beautifully designed application scaffolding for Laravel. Jetstream provides the perfect starting point for your next Laravel application and includes login, registration, email verification, two-factor authentication, session management, API support via Laravel Sanctum, and optional team management.

The Laravel Framework 3.5k Jan 8, 2023
Laravel Larex lets you translate your whole Laravel application from a single CSV file.

Laravel Larex Translate Laravel Apps from a CSV File Laravel Larex lets you translate your whole Laravel application from a single CSV file. You can i

Luca Patera 68 Dec 12, 2022
A Laravel package that adds a simple image functionality to any Laravel model

Laraimage A Laravel package that adds a simple image functionality to any Laravel model Introduction Laraimage served four use cases when using images

Hussein Feras 52 Jul 17, 2022
A Laravel extension for using a laravel application on a multi domain setting

Laravel Multi Domain An extension for using Laravel in a multi domain setting Description This package allows a single Laravel installation to work wi

null 658 Jan 6, 2023
Example of using abrouter/abrouter-laravel-bridge in Laravel

ABRouter Laravel Example It's a example of using (ABRouter Laravel Client)[https://github.com/abrouter/abrouter-laravel-bridge] Set up locally First o

ABRouter 1 Oct 14, 2021
Laravel router extension to easily use Laravel's paginator without the query string

?? THIS PACKAGE HAS BEEN ABANDONED ?? We don't use this package anymore in our own projects and cannot justify the time needed to maintain it anymore.

Spatie 307 Sep 23, 2022