|
1234567891011121314151617181920212223242526272829303132333435363738394041 |
- <?php
-
- namespace producer\controllers;
-
- class ProducerController extends CommonController {
-
- /**
- * @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
- ]) ;
- }
- }
-
- ?>
|