Exemple #1
0
 /**
  * MemosController constructor.
  *
  * @param Memo $memo
  */
 public function __construct(Memo $memo)
 {
     parent::__construct();
     $this->memo = $memo;
     try {
         if ($this->session()->has('TwistOAuth')) {
             $this->TwistOAuth = $this->session('TwistOAuth');
         } else {
             $this->TwistOAuth = new TwistOAuth(env('TWITTER_CK'), env('TWITTER_CS'), env('TWITTER_AT'), env('TWITTER_AS'));
             $this->session()->put('TwistOAuth', $this->TwistOAuth);
         }
     } catch (Exception $e) {
         return $this->onError($e);
     }
 }
 /**
  * PasteBinsController constructor.
  *
  * @param PasteBin $pasteBin
  */
 public function __construct(PasteBin $pasteBin)
 {
     parent::__construct();
     $this->pasteBin = $pasteBin;
 }