Exemplo n.º 1
0
 /**
  * Remove the specified resource from storage.
  *
  * @param  int $id
  * @return \Illuminate\Http\Response
  */
 public function destroy($id)
 {
     if ($result = check_auth_to('YQLJ_DELETE')) {
         return $result;
     }
     try {
         Links::destroy($id);
         return redirect()->action('Admin\\LinksController@index')->with('operationstatus', 'sucess');
     } catch (\Exception $e) {
         return redirect()->back()->withErrors(['error' => '删除友情链接失败,请重试(' . $e->getMessage() . ')']);
     }
 }