Add BackendController/AccesControl
Add the BackendController for all the backend controllers. Add AccesControl
This commit is contained in:
@@ -15,19 +15,8 @@ use backend\models\CustomerUpdate;
|
||||
/**
|
||||
* CustomerController implements the CRUD actions for Customer model.
|
||||
*/
|
||||
class CustomerController extends Controller
|
||||
class CustomerController extends \backend\controllers\BackendController
|
||||
{
|
||||
public function behaviors()
|
||||
{
|
||||
return [
|
||||
'verbs' => [
|
||||
'class' => VerbFilter::className(),
|
||||
'actions' => [
|
||||
'delete' => ['post'],
|
||||
],
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Lists all Customer models.
|
||||
@@ -105,7 +94,6 @@ class CustomerController extends Controller
|
||||
* If deletion is successful, the browser will be redirected to the 'index' page.
|
||||
* @param integer $id
|
||||
* @return mixed
|
||||
*/
|
||||
public function actionDelete($id)
|
||||
{
|
||||
$this->findModel($id)->delete();
|
||||
@@ -113,6 +101,7 @@ class CustomerController extends Controller
|
||||
return $this->redirect(['index']);
|
||||
}
|
||||
|
||||
*/
|
||||
/**
|
||||
* Finds the Customer model based on its primary key value.
|
||||
* If the model is not found, a 404 HTTP exception will be thrown.
|
||||
|
||||
Reference in New Issue
Block a user