public function delete($id = 0)
 {
     if (is_array(Input::get('ids'))) {
         $id = Input::get('ids');
     }
     $ok = Project::destroy($id);
     if ($ok) {
         return Redirect::to('msg')->withInput()->with('jump_sec', 3)->with('jump_url', URL::to('admin/project_list'))->with('message', "删除成功!");
     } else {
         return Redirect::to('msg')->withInput()->with('jump_sec', 3)->with('message', "删除失败!");
     }
 }
예제 #2
0
 public function destroy($id)
 {
     Project::destroy($id);
     return redirect('projects');
 }
예제 #3
0
 /**
  * Remove the specified project from database.
  *
  * @param  string  $user
  * @param  string  $name
  * @param  Request  $request
  * @return Response
  */
 public function destroy($user, $name, Request $request)
 {
     Project::destroy($request->query('id'));
     return redirect()->route('{user}.project.index', Auth::user()->username);
 }