本文整理汇总了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');
}
示例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');
}
示例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'));
}
示例4: destroy
/**
* Remove the specified tag from storage.
*
* @param Tag $tag
* @return \Illuminate\Http\Response
*/
public function destroy($tag)
{
$tag->delete();
}
示例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', 'Тег успешно удален.');
}
示例6: deleteTag
public function deleteTag(Request $request, Tag $tag)
{
//$this->authorize('destroy', $tag); ToDo::policy
$tag->delete();
return redirect('/portfolio');
}
示例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');
}
示例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);
}