當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Tag::delete方法代碼示例

本文整理匯總了PHP中app\Tag::delete方法的典型用法代碼示例。如果您正苦於以下問題:PHP Tag::delete方法的具體用法?PHP Tag::delete怎麽用?PHP Tag::delete使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在app\Tag的用法示例。


在下文中一共展示了Tag::delete方法的8個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: destroy

 public function destroy(Tag $tag)
 {
     if (!$tag->transactions->isEmpty()) {
         flash()->error('Tag cannot be removed while in use');
         return redirect()->route('tag.index');
     }
     $tag->delete();
     flash()->success('Tag removed successfully');
     return redirect()->route('tag.index');
 }
開發者ID:albarincon,項目名稱:money-manager,代碼行數:10,代碼來源:TagController.php

示例2: destroy

 /**
  * Remove the specified resource from storage.
  *
  * @param  Tag  $tag
  * @return \Illuminate\Http\Response
  */
 public function destroy(Tag $tag)
 {
     $tag->delete();
     session()->flash('flash_message', 'Se ha eliminado la etiqueta');
     return redirect('admin/tags');
 }
開發者ID:realnerdo,項目名稱:blog,代碼行數:12,代碼來源:TagsController.php

示例3: destroy

 /**
  * Xóa
  *
  * @param  Tag  $tag
  * @return Response
  */
 public function destroy(Tag $tag)
 {
     \File::delete(public_path(config("image.paths") . 'tags/large' . $tag->image));
     $tag->delete();
     return redirect('admin/tag')->with('flash_message', config('blog.message.deleted'));
 }
開發者ID:khanhpnk,項目名稱:hocvet,代碼行數:12,代碼來源:TagController.php

示例4: destroy

 /**
  * Remove the specified tag from storage.
  *
  * @param  Tag $tag
  * @return \Illuminate\Http\Response
  */
 public function destroy($tag)
 {
     $tag->delete();
 }
開發者ID:lolzballs,項目名稱:website,代碼行數:10,代碼來源:TagController.php

示例5: destroy

 /**
  * Remove the specified resource from storage.
  *
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function destroy(Tag $tag)
 {
     $tag->delete();
     return redirect('/admin/tag')->with('flash_success', 'Тег успешно удален.');
 }
開發者ID:Ravend6,項目名稱:laravel_base_v5.2,代碼行數:11,代碼來源:TagController.php

示例6: deleteTag

 public function deleteTag(Request $request, Tag $tag)
 {
     //$this->authorize('destroy', $tag); ToDo::policy
     $tag->delete();
     return redirect('/portfolio');
 }
開發者ID:candybaby,項目名稱:LaravelTry,代碼行數:6,代碼來源:PortfolioAdminController.php

示例7: destroy

 /**
  * Remove the specified resource from storage.
  *
  * @param  int  $id
  * @return Response
  */
 public function destroy(Tag $tag)
 {
     $tag->delete();
     \Flash::success('Your tag has been Deleted');
     return redirect('admin/tags');
 }
開發者ID:maherelgamil,項目名稱:ketabat,代碼行數:12,代碼來源:TagsController.php

示例8: destroy

 /**
  * Destroy the given task.
  *
  * @param  Request  $request
  * @param  Task  $task
  * @return Response
  */
 public function destroy(Request $request, Tag $tag)
 {
     $tag->delete();
     $request->session()->flash('alert-success', 'Tag was successful deleted!');
     $page = $request->session()->get('tag_page');
     return redirect('/tags?page=' . $page);
 }
開發者ID:silvanwyden,項目名稱:MyPrivateOffice,代碼行數:14,代碼來源:TagController.php


注:本文中的app\Tag::delete方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。