/**
  * Display a listing of the resource.
  *
  * @return \Illuminate\Http\Response
  */
 public function index()
 {
     $aff = Affiliate::all();
     return view('admin/affiliate')->with('affiliates', $aff);
     // admin/affiliate; here affiliate is view name,
     // where as ('affiliate',$aff); affiliate is alise for $aff.i.e, affiliates vararable should be catched in view
 }
 /**
  * Show the form for editing the specified resource.
  *
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function edit($id)
 {
     $crs = Course::find($id);
     $aff = Affiliate::all();
     $stm = Stream::all();
     $lvl = Level::all();
     return view('admin/edit_course')->with('course', $crs)->with('affiliates', $aff)->with('streams', $stm)->with('levels', $lvl);
 }