custom action in cotroller not being accessed

Hi, i am new to YII,

i have created a CRUD with GII. now i am trying to access my own created action in the controller. But i cannot access it. I am getting Error

Not Found (#404)

this is how i am trying to access it.



Here is my controller code. i am only pasting my custom function here because rest of the actions can be accessed. Please guide me what i am missing.


namespace app\controllers;

use Yii;

use app\models\Vaults;

use app\models\VaultsSearch;

use yii\web\Controller;

use yii\web\NotFoundHttpException;

use yii\filters\VerbFilter;


 * VaultsController implements the CRUD actions for Vaults model.


class VaultsController extends Controller



     * @inheritdoc


    public function behaviors()


        return [

            'verbs' => [

                'class' => VerbFilter::className(),

                'actions' => [

                    'delete' => ['POST'],




        return [];




    public function actionDisableVault($id)


        echo 'id: ' . $id; exit;

        $model = $model->findModel($id);

        $model->status = '0';


        if ($model->load(yii::$app->request->post()) && $model->save()) {

            return $this->redirect([



        }else {

            throw new NotFoundHttpException('The requested page does not exist.');





As tri suggests, it looks like your url manager’s rules don’t have a line for this url yet.