Exemplo n.º 1
0
 public function remove($tag_id)
 {
     Tags::destroy($tag_id);
     PostTag::where(['tag_id' => $tag_id])->delete();
     Notifications::add('Tag removed', 'success');
     return Redirect::back();
 }
Exemplo n.º 2
0
 /**
  * Remove the specified resource from storage.
  *
  * @param  int  $id
  * @return Response
  */
 public function destroy(Request $request)
 {
     Tags::destroy($request->tID);
     return "success";
 }
Exemplo n.º 3
0
 /**
  * Remove the specified resource from storage.
  *
  * @param  int $id
  * @return \Illuminate\Http\Response
  */
 public function destroy($id)
 {
     if ($result = check_auth_to('BQGL_DELETE')) {
         return $result;
     }
     try {
         Tags::destroy($id);
         return redirect()->action('Admin\\TagsController@index')->with('operationstatus', 'sucess');
     } catch (\Exception $e) {
         return redirect()->back()->withErrors(['error' => '删除标签失败,请重试(' . $e->getMessage() . ')']);
     }
 }