einnlleinhatt_
einnlleinhatt_
Explore posts from servers
TLCTuto's Laravel Corner
Created by Eyad Mohammed on 11/16/2023 in #💡filament
multi tenancy
You just assign the clinic id to the user. I think the pet clinic covers it 🤔
5 replies
TLCTuto's Laravel Corner
Created by MilenKo on 11/19/2023 in #🚀laravel
Nova vs Filament Admin Panels
I would say just try it first and explore but there is ofcourse a limitation when your apps is growing. And it's also depending on the project you are working on. I myself haven't try nova because of the pricing, I found out filament about a 2 months ago and I'm in love. It's simple and ease to use.
7 replies
TLCTuto's Laravel Corner
Created by MilenKo on 9/14/2023 in #💡filament
How to use custom Admin UI with Filament
The one and only I can think is using custome page.
5 replies
TLCTuto's Laravel Corner
Created by sadiqgoni13 on 10/23/2023 in #💡filament
Login user based on Department Panel
If not maybe you can use this plugin i just found out https://filamentphp.com/plugins/shane-rosenthal-panel-roles
19 replies
TLCTuto's Laravel Corner
Created by sadiqgoni13 on 10/23/2023 in #💡filament
Login user based on Department Panel
@sadiqgoni13did you get it to work ?
19 replies
TLCTuto's Laravel Corner
Created by sadiqgoni13 on 10/23/2023 in #💡filament
Login user based on Department Panel
And inside the panel i will add this
->middleware([
VerifyIsHr::class
->middleware([
VerifyIsHr::class
19 replies
TLCTuto's Laravel Corner
Created by sadiqgoni13 on 10/23/2023 in #💡filament
Login user based on Department Panel
I forgot how to check the user role if 1 or 2 but i would do this maybe
public function handle(Request $request, Closure $next): Response
{
if (Auth::user() && Auth::user()->is_hr) {
return redirect('/hrpanel');
}
}
public function handle(Request $request, Closure $next): Response
{
if (Auth::user() && Auth::user()->is_hr) {
return redirect('/hrpanel');
}
}
19 replies
TLCTuto's Laravel Corner
Created by sadiqgoni13 on 10/23/2023 in #💡filament
Login user based on Department Panel
And inside the hr panel add the VerifyIsHr middleware class in it 🤔
19 replies
TLCTuto's Laravel Corner
Created by sadiqgoni13 on 10/23/2023 in #💡filament
Login user based on Department Panel
@sadiqgoni13 or you can create a new middleware and verify the user is finance or hr
19 replies
TLCTuto's Laravel Corner
Created by sadiqgoni13 on 10/23/2023 in #💡filament
Login user based on Department Panel
Also how do you separate the user role in database ?
19 replies
TLCTuto's Laravel Corner
Created by sadiqgoni13 on 10/23/2023 in #💡filament
Login user based on Department Panel
My bad it's redirect, maybe something like this
public function handle(Request $request, Closure $next, ...$guards)
{
$guards = empty($guards) ? [null] : $guards;

foreach ($guards as $guard) {
if (Auth::guard($guard)->check()) {
return redirect(RouteDepartmentServiceProvider::FINANCE);
}
}

return $next($request);
}
public function handle(Request $request, Closure $next, ...$guards)
{
$guards = empty($guards) ? [null] : $guards;

foreach ($guards as $guard) {
if (Auth::guard($guard)->check()) {
return redirect(RouteDepartmentServiceProvider::FINANCE);
}
}

return $next($request);
}
19 replies
TLCTuto's Laravel Corner
Created by sadiqgoni13 on 10/23/2023 in #💡filament
Login user based on Department Panel
What about using viewAny() ?
19 replies