Custom view for every CRUD #466
-
Hey Everyone! I am starting to learn backpack because I really liked this tool. However, I have a small problem right at the beginning. I am going through a tutorial where I created a CRUD Users (user, users). I wanted to create an individual view for it. According to the documentation I read I should:
However, when I change the name from list.blade.php to user.blade.php, it stops reading the modified template. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
Hello @buliyo thanks for the question. The tutorial you are following is missing a step, telling the In your You can do it with: Let me know, |
Beta Was this translation helpful? Give feedback.
-
I'm closing this issue due to inactivity. If you need further assistance or have additional questions, feel free to reopen this issue or create a new one. We're here to help! |
Beta Was this translation helpful? Give feedback.
Hey @buliyo file organization it's up to you.
You are not overriding backpack views, in this case you are creating a new one. So if you leave it for example in:
resources/views/users/list.blade.php
you should useCRUD::setOperationSetting('view', 'users.list')
.I do not recommend to use the
setListView()
method, as that method would probably end up deprecated in future versions, so I would advise to set the operation setting directly.Cheers