MK | Programmer
MK | Programmer
FFilament
Created by MK | Programmer on 10/24/2024 in #❓┊help
Install Plugin
I’m sure some plugins work, but I can’t install them.
8 replies
FFilament
Created by MK | Programmer on 10/24/2024 in #❓┊help
Install Plugin
Could you provide me with a generic step-by-step guide on how to install a plugin?
8 replies
FFilament
Created by MK | Programmer on 10/24/2024 in #❓┊help
Install Plugin
Could someone provide a step-by-step guide and explain what I might be missing? I have a lot of difficulty installing plugins in general.
8 replies
FFilament
Created by MK | Programmer on 10/22/2024 in #❓┊help
User select
I managed to do it with this:
->relationship(name: 'user', titleAttribute: 'name', modifyQueryUsing: fn (Builder $query) => $query->whereHas('roles', fn (Builder $query) => $query->where('name', 'realtor')))
->relationship(name: 'user', titleAttribute: 'name', modifyQueryUsing: fn (Builder $query) => $query->whereHas('roles', fn (Builder $query) => $query->where('name', 'realtor')))
5 replies
FFilament
Created by MK | Programmer on 4/18/2024 in #❓┊help
Adding Action Buttons to Custom Page for Form Navigation
@Leandro Ferreira How can I remove the delete from a resource? Only allowing view-create-update.
5 replies
FFilament
Created by MK | Programmer on 4/17/2024 in #❓┊help
Implementing Role-Based Access Control for Custom Pages on Filament
How do I make it in canAcess for it to go through a middleware coming from App\Http\Middleware?
13 replies
FFilament
Created by MK | Programmer on 4/17/2024 in #❓┊help
Implementing Role-Based Access Control for Custom Pages on Filament
But
13 replies
FFilament
Created by MK | Programmer on 4/17/2024 in #❓┊help
Implementing Role-Based Access Control for Custom Pages on Filament
Sorry
13 replies
FFilament
Created by MK | Programmer on 4/17/2024 in #❓┊help
Implementing Role-Based Access Control for Custom Pages on Filament
tanks
13 replies
FFilament
Created by MK | Programmer on 4/17/2024 in #❓┊help
Implementing Role-Based Access Control for Custom Pages on Filament
public static function canAccess(): bool { return auth()->user()->canManageSettings(); }
13 replies
FFilament
Created by MK | Programmer on 4/17/2024 in #❓┊help
Implementing Role-Based Access Control for Custom Pages on Filament
My page for example
<?php

namespace App\Filament\Pages;

class MySchools extends Page implements HasForms, HasTable
{

use InteractsWithTable;
use InteractsWithForms;

protected static ?string $navigationIcon = 'heroicon-o-academic-cap';

protected static string $view = 'filament.pages.my-schools';

public static ?string $title = 'Minhas Escolas';

public function tableQuery(): \Illuminate\Database\Eloquent\Builder
{

}

public function table(Table $table): Table
{


}
<?php

namespace App\Filament\Pages;

class MySchools extends Page implements HasForms, HasTable
{

use InteractsWithTable;
use InteractsWithForms;

protected static ?string $navigationIcon = 'heroicon-o-academic-cap';

protected static string $view = 'filament.pages.my-schools';

public static ?string $title = 'Minhas Escolas';

public function tableQuery(): \Illuminate\Database\Eloquent\Builder
{

}

public function table(Table $table): Table
{


}
13 replies
FFilament
Created by MK | Programmer on 4/17/2024 in #❓┊help
Implementing Role-Based Access Control for Custom Pages on Filament
I use policies for resources...
13 replies
FFilament
Created by MK | Programmer on 4/16/2024 in #❓┊help
Limiting Filament Table to User-Accessible in resource
I got it with this
8 replies
FFilament
Created by MK | Programmer on 4/16/2024 in #❓┊help
Limiting Filament Table to User-Accessible in resource
It is indeed from a resource, I abstracted the code.
8 replies
FFilament
Created by MK | Programmer on 4/15/2024 in #❓┊help
Preventing Duplicate 'Active' Records in Model Using Filament
Can we use a query in the unique() function for this?
7 replies
FFilament
Created by MK | Programmer on 4/15/2024 in #❓┊help
Preventing Duplicate 'Active' Records in Model Using Filament
Yes, but I need a query so that this exception is related to the current school. For example: school_id = 1. I need it to search the table for everything in the SchoolDiar model and check if there already exists one with 'active' value 'Ativa'.
7 replies
FFilament
Created by MK | Programmer on 4/15/2024 in #❓┊help
Preventing Duplicate 'Active' Records in Model Using Filament
The question is simply how to prevent a new entry if there's already another entry in the table with 'active' value 1.
7 replies