示例#1
0
 /**
  * Show the form for editing the specified resource.
  *
  * @param  int  $id
  * @return Response
  */
 public function publish($slug)
 {
     $vacancy = Vacancy::findBySlug($slug);
     $vacancy->update(['is_published' => $vacancy->is_published ? 0 : 1]);
     return Redirect::route('vacancies.admin');
 }