Example #1
0
 private function checkToken()
 {
     $row = Model::ApiAuth()->where(['token', '=', $this->token])->first(true);
     if ($row) {
         $row->setExpiration(time() + 3600)->save();
         return true;
     }
     Api::forbidden();
 }
Example #2
0
 public function __construct()
 {
     echo __METHOD__ . "\n";
     parent::__construct();
 }