/**
  * Show the form for editing the specified resource.
  *
  * @param  int $id
  * @return \Illuminate\Http\Response
  */
 public function edit($id)
 {
     try {
         $referrals = Referral::paginate(env('LIMIT', 15));
         $referral = Referral::findOrFail($id);
     } catch (ModelNotFoundException $ex) {
         Flash::error('No referral found' . $ex);
         return redirect()->route('referrals.index');
     }
     return view('referrals.index', compact('referral', 'referrals'));
 }