How can we assign multiple permissions to a single role at once?
$permission1 = Permission::create(['name' => 'Create Client']);
$permission2 = Permission::create(['name' => 'View Invoice']);
$permission3 = Permission::create(['name' => 'Add Product']);
$role = Role::findById(1);
$role->givePermissionTo($permission1);
In above, I'm only giving permission to the first one.
As this is also achived by, $role->syncPermissions($permissions);
Im confused how $permission includes multiple permissions?
Any advice please?