示例#1
0
 /**
  * Remove the specified tag from storage.
  *
  * @param  int  $id
  * @return Response
  */
 public function destroy($id)
 {
     Tag::destroy($id);
     return Redirect::route('tags.index');
 }
 /**
  * Remove the specified resource from storage.
  *
  * @param  int  $id
  * @return Response
  */
 public function destroy($id)
 {
     try {
         $tag = Tag::findOrFail($id);
     } catch (Exception $e) {
         return Redirect::to('/tag')->with('flash_message', 'Tag not found');
     }
     # Note there's a `deleting` Model event which makes sure book_tag entries are also destroyed
     Tag::destroy($id);
     return Redirect::action('TagController@index')->with('flash_message', 'Your tag has been deleted.');
 }
 /**
  * Remove the specified resource from storage.
  *
  * @param  int  $id
  * @return Response
  */
 public function destroy($id)
 {
     Tag::destroy($id);
     return Redirect::route("projects.index");
 }
示例#4
0
文件: Tag.php 项目: rituzy/iblog
 public static function merge($tagsMerge, $tagTomergeWith)
 {
     DB::table('taggables')->whereIn('tag_id', $tagsMerge)->update(['tag_id' => $tagTomergeWith]);
     Tag::destroy($tagsMerge);
 }
 public function deleteTag()
 {
     $id = Input::get('id');
     Tag::destroy($id);
     return $this->success(null, null);
 }
示例#6
0
 /**
  * Remove the specified tag from storage.
  *
  * @param  int  $id
  * @return Response
  */
 public function destroy($id)
 {
     Tag::destroy($id);
 }