|
- <?php
-
- namespace producer\controllers;
-
- class ProducerController extends ProducerBaseController {
-
- /**
- * @inheritdoc
- */
- public function behaviors() {
- return [];
- }
-
- public function actions() {
- return [
- 'error' => [
- 'class' => 'yii\web\ErrorAction',
-
- ],
- ];
- }
-
- public function actionIndex() {
-
- $etablissement = Etablissement::findOne(['slug' => Yii::$app->getRequest()->getQueryParam('slug_producer')]) ;
- $points_vente = [] ;
- if($etablissement) {
- $points_vente = PointVente::find()
- ->where([
- 'id_etablissement' => $etablissement->id,
- ])
- ->all() ;
- }
-
- return $this->render('index',[
- 'points_vente' => $points_vente
- ]) ;
- }
- }
-
- ?>
|