F
Filament16mo 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
awcodes16mo ago
Create a custom widget. Render you link in the view of that widget. Add widget to dashboard.
vas
vasOP16mo 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
awcodes16mo ago
I wouldn't think you would need any methods. You put the html for your link in the blade view.
vas
vasOP16mo ago
where can i find the balde view for this ? 🙂
awcodes
awcodes16mo 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
vasOP16mo ago
ha lol yea
awcodes
awcodes16mo ago
resources/views/filament/widgets/back-to-main-site.blade.php
vas
vasOP16mo ago
so blind facepalmz
awcodes
awcodes16mo ago
all good
vas
vasOP16mo ago
thank you

Did you find this page helpful?