Script to open related local file, VERY USEFUL

When you are creating an application is very easy to get lost switching from file to file.

Model, Controller, View

Here’s a script that checks what files are being used so you can click on it and make changes easily!!

  1. Use firefox

  2. Install extension "Local Filesystem Links"

  3. Put this somewhere in your code:




<div style="float: right;" ">

<a href="file:///<?=Yii::getAlias('@app');?>\models\<?=ucwords(Yii::$app->controller->getUniqueId());?>.php">models\<?=ucwords(Yii::$app->controller->getUniqueId());?>.php</a><br>

<a href="file:///<?=Yii::getAlias('@app');?>\controllers\<?=ucwords(Yii::$app->controller->getUniqueId());?>Controller.php">controllers\<?=ucwords(Yii::$app->controller->getUniqueId());?>Controller.php</a><br>

<a href="file:///<?=Yii::getAlias('@app');?>\views\<?=Yii::$app->controller->getUniqueId();?>\<?=Yii::$app->controller->action->id;?>.php">views\<?=Yii::$app->controller->getUniqueId();?>\<?=Yii::$app->controller->action->id;?>.php</a>

</div>



Use a good text editor like Atom or IDE like Netbeans, Eclipse, phpStorm.

+1 for Atom, love it!