for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php namespace Modules\User\Repositories\Sentry;
use Cartalyst\Sentry\Facades\Laravel\Sentry;
use Modules\User\Repositories\RoleRepository;
class SentryRoleRepository implements RoleRepository
{
/**
* Return all the roles
* @return mixed
*/
public function all()
return Sentry::findAllGroups();
}
* Create a role resource
public function create($data)
unset($data['slug']);
Sentry::createGroup($data);
* Find a role by its id
* @param $id
public function find($id)
return Sentry::findGroupById($id);
* Update a role
* @param $data
public function update($id, $data)
$role = Sentry::findGroupById($id);
$role->update($data);
* Delete a role
public function delete($id)
return $role->delete();
* Find a role by its name
* @param string $name
public function findByName($name)
return Sentry::findGroupByName($name);