/**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index()
 {
     $order = Order::count();
     $supply = Supply::count();
     $spares = Spares::count();
     $car = Cars::count();
     $data = array('order' => $order, 'supply' => $supply, 'spares' => $spares, 'car' => $car);
     if ($this->manager) {
         return View::make('dashbord.manager')->with($data);
     } else {
         if ($this->salesman) {
             return View::make('dashbord.salesman')->with($data);
         } else {
             return redirect('/login');
         }
     }
 }
 /**
  * Remove the specified resource from storage.
  *
  * @param  int  $id
  * @return Response
  */
 public function destroy($id)
 {
     $supply = Supply::find($id);
     $supply->delete();
     // redirect
     Session::flash('message', 'Successfully deleted the supply!');
     return Redirect::to('supply');
 }