thiktak
Thoughts on best practices for a View
Hello,
A solution I implemented 🙂 (waiting Aymanalhattami to review my changes before working on singles pages)
1. Create a MenuBuilder class (Menus\MySettingsMenu), and build it with all your pages & groups.
2. Create a sidebar component like this one:
https://github.com/Thiktak/filament-page-with-sidebar/blob/vFilament/resources/views/components/sidebar.blade.php
3. On each page, define a custom view with grid layout
On the view, call the component you created, like this file (l23)
https://github.com/Thiktak/filament-page-with-sidebar/blob/vFilament/resources/views/components/page.blade.php#L23
(Play with layout if you want to build a single layout page with sidebar)
4. Pass the MenuBuilder ->getNavigation() to the component
7 replies
How to get record data or just id of a relation manager record.
Depending where you need it 🙂
Inside some function, you can use $this->record
Inside table() : (you can check for form, should have something similar)
Inside form(), you can also use a function 🙂
Just need to found the object that can provide the record 🙂 (Livewire ? Component ? etc ..)
21 replies