F
Filamentβ€’14mo ago
vas

how can i go about adding a back to main page link on the dashboard

how can i go about adding a back to main page link on the dashboard
No description
10 Replies
awcodes
awcodesβ€’14mo ago
Create a custom widget. Render you link in the view of that widget. Add widget to dashboard.
vas
vasOPβ€’14mo ago
ok done this php artisan make:filament-widget BackToMainSite what method should i use in the acutal class
class BackToMainSite extends Widget
{
protected static string $view = 'filament.widgets.back-to-main-site';

}
class BackToMainSite extends Widget
{
protected static string $view = 'filament.widgets.back-to-main-site';

}
awcodes
awcodesβ€’14mo ago
I wouldn't think you would need any methods. You put the html for your link in the blade view.
vas
vasOPβ€’14mo ago
where can i find the balde view for this ? πŸ™‚
awcodes
awcodesβ€’14mo ago
The Widget is just a Livewire component, so you would treat it the same as any other Livewire component. it's right there.
vas
vasOPβ€’14mo ago
ha lol yea
awcodes
awcodesβ€’14mo ago
resources/views/filament/widgets/back-to-main-site.blade.php
vas
vasOPβ€’14mo ago
so blind facepalmz
awcodes
awcodesβ€’14mo ago
all good
vas
vasOPβ€’14mo ago
thank you
Want results from more Discord servers?
Add your server