Timster8989
View column javascript
I ended up solving this in the following way:
this to table definition:
This as a separate function:
And inside the view file I have just plain vanilla JS.
I still wonder though whether there is a more elegant way to handle this, but at least this works.
4 replies
Custom table component + javascript library
Thanks Saade! However, my problem is not loading the script for Filament in general, for this I use exactly the AppProvider to register it. It's loaded on the page. Problem is, that my Column view file is unable to use it (I believe it's a LiveWire component, which loads via ajax after all).
4 replies
Widget order on a panel
Thank you so much for your help! This was entirely my own stupidity; I had to include the "dashboard" using render hook as passing main page javascript to widgets turned out to be little problematic. Trying to get around this by using "panels::page.footer-widgets.before" render hook. Unfortunately:
Inside the Dashboard.php page results in "Unable to find component: [app.filament.widgets.footer-widget]". This happens even if I have nothing defined inside the widget. Maybe I'm again misunderstanding something?
11 replies
Selective Multi-tenancy
I have all my models extend one base model which defines QueryLimiter. Inside this I define limits for each table that requires multi tenancy. This helps to keep limit logic in one place and keeps the code very compact. Beauty of Eloquent.
17 replies
Related record, pivot extra column values
For anyone else stumbling here, here would be how to do it via the relation definition:
public function role()
{
return $this->belongsToMany(\App\Models\BaseModels\Bouncer\Roles::class,'assigned_roles','entity_id','role_id','id','id')->withPivotValue('entity_type','App\Models\User');
}
3 replies
Relationship between two dependent select fields
You didn't say whether you are in v3. But if you are, check here:
https://filamentphp.com/docs/3.x/forms/fields/select#customizing-the-relationship-query
Disabling specific options
11 replies
Understanding view rendering
I was running circles, because there is also FilamentAsset::register ... and for some funny reason my page doesn't have tailwind unless I include it from there -> it breaks other stuff. But I'll figure it out now that I got past the biggest stumbling block in understanding.
41 replies