本文整理匯總了PHP中app\Permission::destroy方法的典型用法代碼示例。如果您正苦於以下問題:PHP Permission::destroy方法的具體用法?PHP Permission::destroy怎麽用?PHP Permission::destroy使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類app\Permission
的用法示例。
在下文中一共展示了Permission::destroy方法的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: delete
/**
* delete data
* @return json
*/
public function delete()
{
$id = (int) $_POST['id'];
$rs = Permission::destroy($id);
if ($rs) {
return response()->json(['status' => 200, 'message' => 'Deleted Successfully~~']);
} else {
return response()->json(['status' => 400, 'message' => 'Delete Failure~~']);
}
}
示例2: destroy
/**
* Remove the specified resource from storage.
*
* @param int $id
* @return Response
*/
public function destroy($id)
{
Permission::destroy($id);
flash()->success('Success!', 'Permission has been deleted!');
return redirect('permissions');
}
示例3: destroy
public function destroy(Request $request, $id)
{
empty($id) && !empty($request->input('id')) && ($id = $request->input('id'));
$id = (array) $id;
foreach ($id as $v) {
$permission = Permission::destroy($v);
}
return $this->success('', count($id) > 5, compact('id'));
}
示例4: destroy
/**
* Remove the specified resource from storage.
*
* @param int $id
* @return Response
*/
public function destroy($id)
{
//
Permission::destroy($id);
return redirect('system/permissions');
}
示例5: destroy
/**
* Remove the specified resource from storage.
*
* @param int $id
* @return Response
*/
public function destroy($id)
{
if (!$this->user->userCan('permission-delete')) {
\App::abort(403, 'Access denied');
}
\App\Permission::destroy($id);
return redirect('/admin/permission');
}
示例6: destroy
/**
* Remove the specified resource from storage.
*
* @param int $id
* @return \Illuminate\Http\RedirectResponse
*/
public function destroy($id)
{
Permission::destroy($id);
\Session::flash('flash_message', 'Permission deleted!');
return \Redirect::route('admin.permissions.index', [])->withMessage(trans('acl::permission.permissions-controller-successfully_deleted'));
}
示例7: destroy
/**
* Remove the specified resource from storage.
*
* @param int $id
*
* @return void
*/
public function destroy($id)
{
Permission::destroy($id);
Session::flash('flash_message', 'Permission deleted!');
return redirect('admin/permissions');
}