예제 #1
0
 public function show($id)
 {
     $infoConfig = InfoConfig::first()->toArray();
     $object = Model::find($id);
     if ($object) {
         return view('info.promo', ['object' => $object, 'type' => 'vacancies', 'title' => LANG . '_title', 'text' => LANG . '_text', 'requirements' => LANG . '_requirements', 'infoConfig' => $infoConfig]);
     }
     return redirect('info-center');
 }
예제 #2
0
 /**
  * Remove the specified resource from storage.
  *
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function destroy($id)
 {
     $object = Model::find($id);
     if ($object) {
         $object->delete();
     }
     return redirect()->back();
 }