public function actionIndex()
 {
     $model = new ConsumerLog('search');
     $model->unsetAttributes();
     $amount = ConsumerLog::model()->getAmount();
     if ($_GET['ConsumerLog']) {
         $model->attributes = $_GET['ConsumerLog'];
         /* var_dump($_GET);
            exit;*/
         $amount = ConsumerLog::model()->getAmount($_GET['ConsumerLog']);
     }
     $names = Store::model()->getName();
     $this->render('index', ['model' => $model, 'names' => $names, 'amount' => $amount]);
 }
Exemple #2
0
 /**
  * Initializes the Log classes
  * @return type
  */
 private static function boot()
 {
     self::$monolog = new Logger('Consumer');
     //self::$monolog->pushHandler(new StreamHandler('php://stdout'));
     self::$monolog->pushHandler(new RotatingFileHandler(__DIR__ . '/../../logs/consumer.log', 7));
 }