PHP Class Artesaos\Defender\Repositories\Eloquent\EloquentPermissionRepository

Inheritance: extends AbstractEloquentRepository, implements Artesaos\Defender\Contracts\Repositories\PermissionRepository
Show file Open project: artesaos/defender

Public Methods

Method Description
__construct ( Illuminate\Contracts\Foundation\Application $app, Artesaos\Defender\Contracts\Permission $model )
create ( string $permissionName, string $readableName = null ) : Artesaos\Defender\Contracts\Permission Create a new permission using the given name.
getActivesByUser ( $user ) : Illuminate\Database\Eloquent\Collection
getByRoles ( array $rolesIds ) : Illuminate\Database\Eloquent\Collection

Method Details

__construct() public method

public __construct ( Illuminate\Contracts\Foundation\Application $app, Artesaos\Defender\Contracts\Permission $model )
$app Illuminate\Contracts\Foundation\Application
$model Artesaos\Defender\Contracts\Permission

create() public method

Create a new permission using the given name.
public create ( string $permissionName, string $readableName = null ) : Artesaos\Defender\Contracts\Permission
$permissionName string
$readableName string
return Artesaos\Defender\Contracts\Permission

getActivesByUser() public method

public getActivesByUser ( $user ) : Illuminate\Database\Eloquent\Collection
$user
return Illuminate\Database\Eloquent\Collection

getByRoles() public method

public getByRoles ( array $rolesIds ) : Illuminate\Database\Eloquent\Collection
$rolesIds array
return Illuminate\Database\Eloquent\Collection