当前位置: 首页>>代码示例>>PHP>>正文


PHP Page::delete方法代码示例

本文整理汇总了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");
 }
开发者ID:erayaydin,项目名称:erayaydin,代码行数:8,代码来源:PageController.php

示例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.');
 }
开发者ID:ravuthz,项目名称:cms-laravel5.1,代码行数:9,代码来源:PageController.php

示例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'));
 }
开发者ID:JRizzle88,项目名称:wewillcode,代码行数:13,代码来源:PagesController.php

示例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'));
 }
开发者ID:abada,项目名称:laravel-5-simple-cms,代码行数:11,代码来源:PageController.php

示例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' => '删除失败'];
 }
开发者ID:CaliProject,项目名称:mikenong-dev,代码行数:11,代码来源:ManageController.php

示例6: destroy

 public function destroy(Page $page)
 {
     $page->delete();
     return redirect()->route("admin.page.index")->with("success", trans("realestateadmin::page.deleted"));
 }
开发者ID:labkod,项目名称:real-estate,代码行数:5,代码来源:PageController.php

示例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]);
 }
开发者ID:AmilcarCondino,项目名称:Circulo_v2,代码行数:13,代码来源:PageController.php

示例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');
     }
 }
开发者ID:AmilcarCondino,项目名称:circulo,代码行数:13,代码来源:PagesController.php

示例9: delete

 public function delete(Page $page)
 {
     $page->delete();
     return Redirect::back();
 }
开发者ID:AlexKomrakov,项目名称:czo,代码行数:5,代码来源:PagesController.php

示例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'));
 }
开发者ID:EneaWeb,项目名称:aliangel,代码行数:14,代码来源:PageController.php

示例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]);
 }
开发者ID:tmrwbo,项目名称:infinity-next,代码行数:11,代码来源:PageController.php

示例12: delete

 /**
  * Delete page
  * 
  * @param Page $page
  * @return \Illiminate\Http\RedirectResponse
  */
 public function delete(Page $page)
 {
     $page->delete();
     return redirect('admin/pages/list');
 }
开发者ID:dookda,项目名称:mapigniter2,代码行数:11,代码来源:PageController.php

示例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');
 }
开发者ID:nasikgiga,项目名称:onlineshop,代码行数:11,代码来源:PageController.php


注:本文中的app\Page::delete方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。