Showing posts with label HasRoles Trait. Show all posts
Showing posts with label HasRoles Trait. Show all posts

Tuesday, 8 August 2023

Trait "App\Models\HasRoles" not found error in laravel

Error:

 Trait "App\Models\HasRoles" not found error in Laravel




Understanding the Error

If you see the error message "Trait 'App\Models\HasRoles' not found," it usually means that your Laravel app is using role-based access control (RBAC) features. The Laravel framework doesn't come with built-in RBAC features, so developers often use third-party packages like Spatie's Laravel-permission to add these features. When the Laravel app can't find the HasRoles trait that should be part of the model's definition, this error happens.

.htaccess not working even though allowoverride is enabled

You're not the only one who has had the annoying problem with Apache where your file doesn't work even after you enable it. Who has ...