Ejemplo n.º 1
0
 public function showLowongan($slug)
 {
     $data['menuse'] = Menu::orderBy('id')->get()->keyBy('id');
     $data['agenda5'] = Agenda::orderBy('id', 'desc')->take(4)->get();
     $data['footers'] = Footer::orderBy('id')->get()->keyBy('id');
     $data['post'] = Lowongan::where('slug', '=', $slug)->firstOrFail();
     return view('lowongan.showLowongan')->with('data', $data);
 }
Ejemplo n.º 2
0
 /**
  * Remove the specified resource from storage.
  *
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function destroy($id)
 {
     $lowongans = Lowongan::find($id);
     $lowongans->delete();
     return response()->json(["pesan" => "dell"]);
 }