I am having couple of controllers
and they both have action named ‘Index’.
Now,what i want is to allow access of ‘site/index’ action without logged in and do not allow access of ‘project/index’ action.i have configure ‘web.php’ file as below.
‘as beforeRequest’ => [
'class' => 'yii\filters\AccessControl', 'rules' => [ [ 'actions' => ['login','index'], 'allow' => true, ], [ 'allow' => true, 'roles' => ['@'], ], ], ],
but this allows both index action to be accessed without logged in.is there any way to do this expect renaming actions?