add indexes, add messagedetsta
This commit is contained in:
@@ -8,6 +8,8 @@ use backend\models\KeySearch;
|
||||
use yii\web\Controller;
|
||||
use yii\web\NotFoundHttpException;
|
||||
use yii\filters\VerbFilter;
|
||||
use common\models\Customer;
|
||||
use backend\models\KeyCustomerSearch;
|
||||
|
||||
/**
|
||||
* KeyController implements the CRUD actions for Key model.
|
||||
@@ -41,6 +43,28 @@ class KeyController extends Controller
|
||||
'dataProvider' => $dataProvider, //csomagoló osztály a queryhez
|
||||
]);
|
||||
}
|
||||
/**
|
||||
* Lists all Key models.
|
||||
* @return mixed
|
||||
*/
|
||||
public function actionIndexCustomer($id)
|
||||
{
|
||||
|
||||
$model = Customer::findOne($id);
|
||||
|
||||
if ( !isset($model)){
|
||||
throw new NotFoundHttpException('The requested page does not exist.');
|
||||
}
|
||||
|
||||
|
||||
$searchModel = new KeyCustomerSearch(['customer' => $model]);
|
||||
$dataProvider = $searchModel->search(Yii::$app->request->queryParams);
|
||||
// backend/views/kex/index.php
|
||||
return $this->render('index-customer', [
|
||||
'searchModel' => $searchModel,
|
||||
'dataProvider' => $dataProvider, //csomagoló osztály a queryhez
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Displays a single Key model.
|
||||
|
||||
Reference in New Issue
Block a user