public function desasignar() { $rol = Role::find(Input::get('role_id')); $rolPermisos = RolesPermission::where('role_id', '=', Input::get('role_id'))->where('permission_id', '=', Input::get('permission_id'))->get()->first(); $desasignar = RolesPermission::destroy($rolPermisos->id); return Response::json('ok'); }
/** * Display a listing of the resource. * * @return Response */ public function index() { return View::make('role.role', array('roles' => Role::all(), 'permisos' => Permission::all(), 'rolespermisos' => RolesPermission::all())); }