Example #1
0
 public function show($id)
 {
     $driver = Driver::find($id);
     return view('investor.assets.driver.detail', compact('driver'));
 }
 /**
  * Remove the specified resource from storage.
  *
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function destroy($id)
 {
     $driver = new Driver();
     $dataDriver = $driver->find($id);
     if (isset($dataDriver->id)) {
         $driver->destroy($id);
         return response()->json(['status' => 'success', 'messages' => 'delete successfully']);
     }
     return response()->json(['status' => 'fail', 'messages' => 'Not Found Driver With ID=' . $id]);
 }