Ejemplo n.º 1
0
 /**
  * Display a listing of the resource.
  *
  * @param Request $request
  * @return Response
  */
 public function index()
 {
     $affilliates = Affiliate::all();
     foreach ($affilliates as $key => $value) {
         $value->token = Crypt::encrypt($value->id);
         $value->save();
     }
     return view('test.index');
 }
Ejemplo n.º 2
0
 public function affiliates()
 {
     return $this->belongsTo(Affiliate::getClass(), 'affiliate_id', 'id')->orderBy('id', 'DESC');
 }