In this video, you'll learn how to create custom Laravel Route files. Laravel makes adding routes to your application super easy, but sometimes your route files get a litter cluttered or large. So, it can be a little difficult to deal with large route file. But if you add your own custom route file that clean thing up and make it a lot more organized.
Sometimes you need to create a controller which doesn’t cover all seven resourceful methods, like index(), create(), store() etc. You just need controller which does one thing and you’re struggling how to name that method. No more struggle, there’s __invoke() method.
Since 5.6, Laravel has shipped with functionality to sign URLs. These URLs append a "signature" to the query string, so that Laravel can verify that the link has not been tampered with since it was created.
This package allows any Eloquent model record to have a custom URL associated to it through a polymorphic one-to-one relationship.
The URL will be automatically saved inside the urls table, along with the model using the created and updated Eloquent events.
When the model is force deleted, the corresponding URL will also be deleted by leveraging the deleted Eloquent event.