Widget blade, white screen
I've seen another post in here but it didn't solve my issue, been trying for a while...
this is my blade (
resources/views/filament/widgets/property-stats.blade.php
):
php
This is my PropertyStats class (App\Livewire):
php
and of course the widget is being called in the panel:
php
What shows in the console is an error 500 and the dashboard turns to a white screen.6 Replies
Not sure what you're trying to do but I would look for a php Error. Maybe in the logs
The logs show a memory limit error, I've increased it.
Im trying to add a title above the widget like this:
I think I might know why this is happening. You are trying to add a widget to a blade file, where the view of the widget is the file itself
Therefore you are creating a loop
protected static string $view = 'filament.widgets.property-stats';
is the same as the name of the widget you are trying to load it to
Its like saying you are trying to load the widget withing the widgetYour answer seems logical. It works when I comment out the $view. But this way, the blade won't execute.
Also works when I comment out the @livewire in the blade.
Any ideas how I can customize the widgets?
You can customize the widget by changing stuff in the view. But it doesn't make any sense to reference the same Livewire component in the view again. You are creating an infinite loop.
Just have a look at the view of the original StatsOverviewWidget and copy that as a baseline.
Now you need to reference the widget in your resource or page
For Resources
For Pages
You customize widgets within the the PropertyStats class