Answers for "assign roles to user"

PHP
1

assign roles to user

use App\Models\User;

$user = User::find(1);

$user->roles()->attach($roleId);
Posted by: Guest on February-13-2021

Browse Popular Code Answers by Language