What are the "partials" folders in Laravel?

Asked

Viewed 225 times

0

In Laravel there are "partials" folders that is a convention? What should I save in these folders?

PS: I’m starting in the Laravel world!

1 answer

3


Partials lives up to the term "partial", which refers to "partial views".

Suppose you have a body, in this body you own: top header, banner, menu and content.

top header, banner and menu would be views partials, dividing the code and making it more readable.

Another example: You have a list of products, a table, that repeats in several parts of the system. Will you repeat code to format that table? No, you create a partial for it.

@each('products.list', $products)

Take a look at the documentation: https://laravel.com/docs/5.4/blade

Browser other questions tagged

You are not signed in. Login or sign up in order to post.