Description
Sir can tell me for views which method mostly used by Laravel developers
1- template inheritance
2-components
Thanks in advance
Hi Talha,
Both ways are working well, I mostly follow the inheritance because it's easier to maintain the skeleton of the app.
I am not saying the component isn't used, it's used by many developers and very efficient in reusing the small items to write the dry code.
Personally, I don't like the components approach, in my opinion, it's time-consuming because we need to reuse the same thing in multiple places, and what if somewhere we want to style it differently from the standard format so we need to customize it with extra effort.
Developers are using both ways but in my understanding and knowledge, I think inheritance is widely used, but this would be different in your case maybe because everyone's learning source is different.
0 Likes 1 Comment
Hadayat Niazi Super Admin
Thank you for posting.