nanopanda
nanopanda
FFilament
Created by taz on 6/22/2024 in #❓┊help
Unconventional Pivot table name. How to tell the Relation manager to use this table name ?
@taz have you tried passing in the table name to your belongsToMany() call? Something like: return $this->belongsToMany( Customer::class, 'chatting_instances' )->...
6 replies
FFilament
Created by taz on 6/22/2024 in #❓┊help
Unconventional Pivot table name. How to tell the Relation manager to use this table name ?
@taz there are two static strings "$relationship" and "$inverseRelationship" where you can set custom relationship names for the RelationManager
6 replies
FFilament
Created by Pritbor on 6/20/2024 in #❓┊help
Using Filament Notification number in Frontpage notification icon
Are you using Laravel Database Notifications? See here: https://laravel.com/docs/11.x/notifications#accessing-the-notifications
7 replies
FFilament
Created by andyov on 6/14/2024 in #❓┊help
Allow Relation Manager to to link to the `view` page rather than open a modal
@andyov You can modify the EditAction url to do something like this, where "yourpanelname" is your Filament panel's route name, and "relation_resource_name" is your child Resource's route name. Artisan route:list will give you the exact route path if you need to check it. Tables\Actions\EditAction::make()->url(fn ($record): string => route( 'filament.yourpanelname.resources.relation_resource_name.edit', ['record' => $record ] ) )
5 replies
FFilament
Created by Garrita on 6/13/2024 in #❓┊help
Error when switching tabs in Relation Manager
@Garrita I encountered this the other day after upgrade to 3.2.87. What is your Filament version? I upgraded to .88, removed public/js/filament and ran artisan filament:upgrade and now it's working again
5 replies
FFilament
Created by Hasbullah on 5/31/2024 in #❓┊help
Filament Shield
@Hasbullah you can add one, or even just add a "Gate::policy( 'Model\Name', 'Policy\Name' )" to your AppServiceProvider boot for a quick test. To register your own provider, add to /Bootstrap/providers.php. If you extend "Illuminate\Foundation\Support\Providers\AuthServiceProvider", you only need to override the $policies []. You can take a look at the core AuthServiceProvider to see how it registers everything in $policies with Gate. Anyhow, something like this should do it: <?php namespace App\Providers; use Illuminate\Foundation\Support\Providers\AuthServiceProvider as ServiceProvider; class AuthServiceProvider extends ServiceProvider { protected $policies = [ 'Spatie\Permission\Models\Role' => 'App\Policies\RolePolicy', ]; }
5 replies
FFilament
Created by Hasbullah on 5/31/2024 in #❓┊help
Filament Shield
Have you tried modifying your AuthServiceProvider as per the instructions in the docs? See this section: "Custom folder structure for Models or Third-Party Plugins"
5 replies
FFilament
Created by arif on 5/29/2024 in #❓┊help
Filament Shield allows create/edit/delete despite role restrictions. Shouldn't have these permission
Perhaps "shield:generate --all" was run during installation? When you add new Models/Resources you need to rerun in order to generate a Policy
7 replies
FFilament
Created by arif on 5/29/2024 in #❓┊help
Filament Shield allows create/edit/delete despite role restrictions. Shouldn't have these permission
@arif Have you generated policies for your models/resources? Shield will not enforce the assigned permissions without a Policy registered
7 replies
FFilament
Created by Alnuaimi on 11/30/2023 in #❓┊help
The Shiled Roles Not work with Activity Log
Have you generated a Policy for the Activity model? See the "Policies" section of the Shield docs, specifically you may need "Custom folder structure for Models or Third-Party Plugins"
5 replies