Thursday, September 21, 2023
HomePHPLaravel Folio|Laravel Information

Laravel Folio|Laravel Information

Laravel Folio is a brand-new automated documents as well as directory-based transmitting system. This offers you a “web pages” directory site; when among those web pages is struck from the link, it immediately lots. Laravel Folio is set up to be launched following week, as well as below is a sneak peek of what Taylor demoed at Laracon:

To utilize this attribute, inform Laravel where your web pages are situated by specifying them in the boostrap/app. php documents:

return Application:: configure()

->> withRouting(

internet: __ DIR __'/./ routes/web. php',

commands: __ DIR __'/./ routes/console. php',

web pages: __ DIR __'/./ resources/views/pages',


For instance, if you have a fixed website with an index web page as well as a regarding web page, after that your Links would certainly resemble this:

Those would certainly after that map to an index.blade.php documents as well as an about.blade.php documents.

Laravel Folio likewise sustains wildcards in your web page names. This enables vibrant transmitting. For instance:

individuals/[id] blade.php

You can after that utilize the id on top of the web page to draw in the design from the db straight in Blade.


$ customer =/ App/Models/User:: findOrFail($ id);


Yet you can likewise benefit from path design binding by transforming the documents name to utilize the Design:

/ individuals/[User] blade.php

After that it feels in one’s bones to fill the Customer with the id passed. Pretty effective!

Yet delay, there’s even more …

You can likewise bind versions to a directory site such as this:

/ talks/[Talk]/ feedback.php

This would certainly map to as well as immediately fill the Talk design behind the scenes utilizing FindOrFail


Most Popular

Recent Comments