Emil | Emien
Emil | Emien
FFilament
Created by FerVillanuev4s on 10/5/2023 in #❓┊help
Allow duplicates?
How does your code look? Have you added id field on the pivot table? and allowsDuplicates?
protected bool $allowsDuplicates = true;
protected bool $allowsDuplicates = true;
7 replies
FFilament
Created by bellini on 8/13/2023 in #❓┊help
Display relationship data in a resource
Tables\Columns\TextColumn::make('user.name')
Tables\Columns\TextColumn::make('user.name')
https://filamentphp.com/docs/3.x/tables/columns/relationships#displaying-data-from-relationships
4 replies
FFilament
Created by BKF Dev on 8/5/2023 in #❓┊help
Access to panel
I use a Middleware
class IsAdmin
{
public function handle(Request $request, Closure $next): Response
{
if (Auth::user() && !Auth::user()->is_admin) {
abort(403, 'Access denied');
}

return $next($request);
}
}
class IsAdmin
{
public function handle(Request $request, Closure $next): Response
{
if (Auth::user() && !Auth::user()->is_admin) {
abort(403, 'Access denied');
}

return $next($request);
}
}
And then added it to the middleware() on the panel.
28 replies