本文整理汇总了PHP中app\Page::delete方法的典型用法代码示例。如果您正苦于以下问题:PHP Page::delete方法的具体用法?PHP Page::delete怎么用?PHP Page::delete使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类app\Page
的用法示例。
在下文中一共展示了Page::delete方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: destroy
public function destroy(Page $page)
{
if ($page->image && \File::exists(public_path() . "/" . $page->image)) {
\File::delete(public_path() . "/" . $page->image);
}
$page->delete();
return redirect()->route("backend.page.index");
}
示例2: destroy
public function destroy(Page $page)
{
if (\Request::has('id')) {
Page::destroy(\Request::input('id'));
return ['result' => true];
}
$page->delete();
return redirect('dash/page')->with('message', 'Page was delete success.');
}
示例3: destroy
/**
* Remove the specified resource from storage.
*
* @param \App\Page $page
* @return Response
*/
public function destroy(Page $page)
{
$page->delete();
return Redirect::route('superadmin.pages.index')->with('message', 'Page deleted.');
// show after destroy page
//return view('pages.show', compact('page'));
}
示例4: destroy
/**
* Remove the specified page from storage.
*
* @param Page $page
* @return Response
*/
public function destroy(Page $page)
{
$page->delete() == true ? Flash::success(trans('admin.delete.success')) : Flash::error(trans('admin.delete.fail'));
return redirect(route('admin.page.index'));
}
示例5: deletePage
/**
* Deletes a page
*
* @param Page $page
* @return array
* @throws \Exception
*/
public function deletePage(Page $page)
{
return $page->delete() ? ['status' => 'success', 'message' => '成功删除'] : ['status' => "error", 'message' => '删除失败'];
}
示例6: destroy
public function destroy(Page $page)
{
$page->delete();
return redirect()->route("admin.page.index")->with("success", trans("realestateadmin::page.deleted"));
}
示例7: destroy
/**
* Remove the specified resource from storage.
*
* @param Project $project
* @param Module $module
* @param Page $page
* @return \Illuminate\Http\Response
*/
public function destroy(Project $project, Module $module, Page $page)
{
$page->delete();
return redirect()->route('project.module.show', [$project, $module]);
}
示例8: destroy
/**
* Remove the specified resource from storage.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public function destroy(Page $page)
{
//
if ($page->delete()) {
return redirect('paginas');
}
}
示例9: delete
public function delete(Page $page)
{
$page->delete();
return Redirect::back();
}
示例10: destroy
public function destroy(Page $page)
{
if (!Entrust::can('delete_page')) {
return redirect('/dashboard')->withErrors(config('constants.NA'));
}
if (!Helper::getMode()) {
return redirect()->back()->withErrors(config('constants.DISABLE_MESSAGE'));
}
Helper::deleteCustomField($this->form, $page->id);
$page->delete();
$activity = 'Deleted a page';
Activity::log($activity);
return redirect('/page')->withSuccess(config('constants.DELETED'));
}
示例11: destroy
/**
* Remove the specified resource from storage.
*
* @param \App\Page $page
* @return \Illuminate\Http\Response
*/
public function destroy($page)
{
$page->delete();
return redirect()->route('panel.' . ($board->exists ? 'board.' : null) . 'page.' . 'index', ['board' => $this->board ? $board : null]);
}
示例12: delete
/**
* Delete page
*
* @param Page $page
* @return \Illiminate\Http\RedirectResponse
*/
public function delete(Page $page)
{
$page->delete();
return redirect('admin/pages/list');
}
示例13: destroy
/**
* Remove the specified resource from storage.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public function destroy(Page $page)
{
$page->delete();
return redirect('page');
}