Beispiel #1
0
 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]);
 }
Beispiel #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));
 }