Skip to main content

Laravelnote: Pretty Routes Console Command Packages in laravel8

Laravelnote


 Using this package is simple—install it via composer, and you have access to a new route:pretty Artisan command:

composer require wulfheart/pretty_routes

# Or require as a dev dependency if you want
composer require --dev wulfheart/pretty_routes

Then you have a similar API to the route:list command to visualize your routes with a beautiful CLI formatting for max readability and helpful information:

php artisan route:pretty

# Example with options
php artisan route:pretty \
  --except-path=horizon \
  --method=POST \
  --reverse

Here's an example of the output from the project's readme:

Pretty route console output

You can learn more about this package, get full installation instructions, and view the source code on GitHub.

Popular posts from this blog

Composer Security Update (CVE-2021-29472) for leravel #2021

Composer had a security vulnerability reported (CVE-2021-29472) and a new version has been released to address this. Everyone should run  composer self-update  to get v2.0.13 which includes the fix. According to their  announcment : As a precaution after updating Composer we recommend you audit your composer.lock files to ensure they only contain URLs and none which start with -- , e.g. --config and could be considered command line options. Should you find any such URL values despite our belief that this vulnerability was not exploited in the wild, please contact us immediately by email to security@packagist.org. In general we always recommend you review changes you make to your lock files to ensure no untrusted dependencies or external URLs are introduced to your application. Please note that Packagist.org is only a metadata server and package contents are downloaded from a location chosen by the package maintainers. Private Packagist will store copies of mirrored packag...

Laravel8 in Serializes Models trait | laravelnote

This article was originally posted, with additional formatting, on my personal blog at laravel serializes model Background  When dispatching an object onto the queue, behind the scenes Laravel is recursively serializing the object and all of its properties into a string representation that is then written to the queue. There it awaits a queue worker to retrieve it from the queue and unserialize it back into a PHP object (Phew!). Problem When complicated objects are serialized, their string representations can be atrociously long, taking up unnecessary resources both on the queue and application servers. Solution Because of this, Laravel offers a trait called SerializesModels which, when added to an object, finds any properties of type Model or Eloquent\Collection during serialization and replaces them with a plain-old-PHP-object (POPO) known as a ModelIdentifier. These identifier objects represent the original properties Model type and ID, or IDs in the case of an Eloquent\Collecti...

Laravelnote: Customizing Stubs in Laravel by Laravelnote

  This post will show you how to customize stubs used to generate various classes in your application. While a minor inconvenience, manually adjusting every generated class can be tedious, and Laravel provides a way for developers to publish and version stubs in an application if you want to suit generated classes to your specific taste. If you want to follow along, you can create a new Laravel project with the  Laravel installer , using Sail, or any other way you prefer to create a new application: laravel new stub-demo --git You might have noticed that the  Laravel installer now supports Git and GitHub integration  assuming you have the minimum git version required, you should have a new repository and a first commit. Versioning our demo project is an excellent way to visualize the stub changes we make along the way and see what kind of files Laravel publishes to the app. Publishing Stubs #laravelnote The first step in customizing stubs could be to add stubs you'd ...