PHP Class Artesaos\Defender\Repositories\Eloquent\EloquentPermissionRepository

Inheritance: extends AbstractEloquentRepository, implements Artesaos\Defender\Contracts\Repositories\PermissionRepository
Afficher le fichier Open project: artesaos/defender

Méthodes publiques

Méthode 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 méthode

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

create() public méthode

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

getActivesByUser() public méthode

public getActivesByUser ( $user ) : Illuminate\Database\Eloquent\Collection
$user
Résultat Illuminate\Database\Eloquent\Collection

getByRoles() public méthode

public getByRoles ( array $rolesIds ) : Illuminate\Database\Eloquent\Collection
$rolesIds array
Résultat Illuminate\Database\Eloquent\Collection