Questions tagged [laratrust]
29 questions
0
votes
0 answers
Illuminate\Database\Eloquent\Relations\BelongsToMany::save(): Argument #1 ($model) must be of type Illuminate\Database\Eloquent\Model, null given
I'm trying to develop a simple freelancing platform with laravel breeze. When i tried to implement a massaging feature between freelancer and admin-(jobs are posted by admin not clients) im getting this…
0
votes
2 answers
how to check if user has role or permission in blade laravel
I am working with Laravel 8 and I use Laratrust package for roles and permissions
i Use the following directives to check role or permission in blade view
@permission('add_user')
create new user…

Mokhtar Ghaleb
- 423
- 13
- 26
0
votes
1 answer
Adding condition status =1 to laratrust authetification using Laravel8
I'm using the Laratrust package to manage the authentification.
Now I'm trying to adding a new condition to autheticate.
The user should have the status=1 to login.
So I'm using the function autheicate() defined in laratrust , I'm just adding the…

saadia
- 79
- 9
0
votes
2 answers
Laratrust show user role inside of team
I am trying to make a connection between teams and users.
Pretty much Latrust looks like an awesome package BUT some things I believe could be explained better.
Let's pick a team (say: team_id = 1):
$team = Team::where('id',…

George G
- 93
- 7
0
votes
3 answers
Laravel 8 Multiple Routes With The Same Url
Good Day
I'm new to Laravel, and I want to create a website that has multiple users (Student, Supervisor, HOD). I want to know if there is a way to have all the users have the same URLs. Below is the approach I used to try to achieve…

Helder Doggo
- 13
- 1
- 5
0
votes
2 answers
I'm using Laravel with Laratrust, How to print a role that's attached to an account?
In my home page, I can print the name and email of a logged account using:
{{ Auth::user()->name }}
{{ Auth::user()->email }}
but when i want to print the role that attached to the account using this:
{{ Auth::user()->roles }}
it prints a…

john_smith
- 85
- 1
- 9
0
votes
1 answer
Laravel run a group of middlewares with a specific guard
I have two different guards api guard and transporter guard, I used laratrust package to manage the users roles and permissions
Route::get('/requests',…

Judge Jules
- 173
- 10
0
votes
1 answer
Laravel - Laratrust how to list user with all the attached roles within a team?
I can assign Role to User within a team and can get team list attached to that user also can get list of Roles to same user, but when I put together to get the Role of each Team attached to that user in the Edit blade, the results get…

luay adnan
- 3
- 3
0
votes
1 answer
Laratrust polymorphic user models returns wrong roles
I am using Laratrust to add roles to my User model. I want to add another table to use roles as well. I added modelAs to the config but Laratrust is confusing the two types. I get the roles from user with id[3] when querying modelA with id[3]. All I…

Daniel
- 611
- 8
- 20
0
votes
2 answers
Laravel with Laratrust - The Mix manifest does not exist?
I did a fresh install of Laravel and Laratrust.
I enabled the Laratrust Panel and when I went to it I got the following...
Screenshot of Error Message
Other solutions I found said to do npm install and npm run dev or npm run production.
These did…

David
- 1
0
votes
1 answer
Truncating Tables when seeding in Laravel 7 with Laratrust
working with Laravel 7 and authenticating system Laratrust 6 and have tried seeding the tables. it has executed with some data tables with data but 3 tables did not seed. users,role_user,permission_user and in my terminal displayed following message…

sign458
- 55
- 8
0
votes
1 answer
some data table not seeds in Laravel 7 with Laratrust
I am using Laravel 7 and Laratrust 6 for the authentication part. but when I run php artisan db:seed command some of following tables users,role_user,permission_user are not seeds with data. how could I fix this problem?
My DatabaseSeedr.php file is…

sign458
- 55
- 8
0
votes
1 answer
User does not have any of the necessary access rights Laravel 6
I am trying to access dashboard as super admin
I used laratrust to set roles and permissions:
laratrustSeeder.php file:
[
'super_admin' => [
'users' => 'c,r,u,d',
'categories'…

shaza
- 37
- 11
-1
votes
1 answer
how to call data from database to view by user_role laratrust
I use laratrust as my user role, in the user role there are 1 = superadministrator, 2 = administrator, 3 = perusahaan, then I want to display the names of existing perusahaan in my view, which means calling user = role id 3, then how to call it? I…

aldi N
- 1