Skip to content
Chirag Gude edited this page Mar 6, 2015 · 3 revisions

Roles

// Find if User has a Role
$user->hasRole('admin');

// Assign Role to User
$user->assignRole($role->id);

// Revoke User's Role
$user->revokeRole($role->id)

Permissions

// Find if User can perform an action
$user->can('access_admin_routes');

Helper Functions

// Find if User is the Admin
$user->isAdmin()

// Find if User is a Member
$user->isMember()

// Find if User is the Owner of the Object
$user->isOwner($object)
Clone this wiki locally