Press "Enter" to skip to content

Having route function in models

Sharing is caring!

Laravel is all about fast development and simplicity in it. There are lots of approach it takes to maintain it. But, some of them can be developed by developers too.

Well, it’s simple right now.

But we will have 50 to hundreds of routes in our application. We will soon forget what name we gave for a particular routes.

In this scenarios, we can defined routes inside model.

Now, when ever we have user model, we can simply use

No more route remembering.

Everything is awesome.

Be First to Comment

    Leave a Reply

    Your email address will not be published.