BakaPresident
BakaPresident
Explore posts from servers
FFilament
Created by BakaPresident on 4/16/2024 in #❓┊help
How do I filter data by permission
Ahh okay... It's okay i'll just return a query that always return false
14 replies
FFilament
Created by BakaPresident on 4/16/2024 in #❓┊help
How do I filter data by permission
okay so must i do like $query = null then return $query;?
14 replies
FFilament
Created by BakaPresident on 4/16/2024 in #❓┊help
How do I filter data by permission
I tried debugging it. It seems to know to go to the return null portion but for some reason it still returns the entire table (i.e return $query)
14 replies
FFilament
Created by BakaPresident on 4/16/2024 in #❓┊help
How do I filter data by permission
Sorry quick question. I have the following code now
->modifyQueryUsing(function (Builder $query) {
if (Auth::user()->hasRole(['general-admin'])) {
return $query;
} else if (Auth::user()->hasRole(['wheelchair-admin'])) {
return $query->where('bus_type', BusOrderType::Wheelchair);
} else {
return null;
}
})
->modifyQueryUsing(function (Builder $query) {
if (Auth::user()->hasRole(['general-admin'])) {
return $query;
} else if (Auth::user()->hasRole(['wheelchair-admin'])) {
return $query->where('bus_type', BusOrderType::Wheelchair);
} else {
return null;
}
})
14 replies
FFilament
Created by BakaPresident on 4/16/2024 in #❓┊help
How do I filter data by permission
ahh okay thanks!
14 replies
FFilament
Created by BakaPresident on 4/16/2024 in #❓┊help
How do I filter data by permission
Using the table function right? Does Policy work the same? I think i poked around it seems filament reflects it on the policy too
14 replies
FFilament
Created by BakaPresident on 10/14/2023 in #❓┊help
Unable to show non numeric primary key in tables?
All we needed is
protected $keyType = 'string';
protected $keyType = 'string';
10 replies
FFilament
Created by BakaPresident on 10/14/2023 in #❓┊help
Unable to show non numeric primary key in tables?
But carplates are unique and only have 1 also right? Should i just change it to numeric then have another field and make it unique?
10 replies
FFilament
Created by BakaPresident on 10/14/2023 in #❓┊help
Unable to show non numeric primary key in tables?
Isn't it logical to have a primary key when it's unique? Carplate are unique so i don't think there's a problem right?
10 replies
FFilament
Created by BakaPresident on 10/14/2023 in #❓┊help
Unable to show non numeric primary key in tables?
No description
10 replies