index
<?php
use yii\helpers\Html;
use yii\grid\GridView;
/* @var $this yii\web\View */
/* @var $searchModel app\models\GeTvipeSearch */
/* @var $dataProvider yii\data\ActiveDataProvider */
$this->title = 'Ge Tvipes';
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="ge-tvipe-index">
<h1><?= Html::encode($this->title) ?></h1>
<?php // echo $this->render('_search', ['model' => $searchModel]); ?>
<p>
<?= Html::a('Create Ge Tvipe', ['create'], ['class' => 'btn btn-success']) ?>
</p>
<?= GridView::widget([
'dataProvider' => $dataProvider,
'filterModel' => $searchModel,
'columns' => [
['class' => 'yii\grid\SerialColumn'],
'vipe_codi',
'vinc_codi',
'pers_auxi',
['class' => 'yii\grid\ActionColumn'],
],
]); ?>
</div>
view
<?php
use yii\helpers\Html;
use yii\widgets\DetailView;
/* @var $this yii\web\View */
/* @var $model app\models\GeTvipe */
$this->title = $model->vipe_codi;
$this->params['breadcrumbs'][] = ['label' => 'Ge Tvipes', 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="ge-tvipe-view">
<h1><?= Html::encode($this->title) ?></h1>
<p>
<?= Html::a('Update', ['update', 'id' => $model->vipe_codi], ['class' => 'btn btn-primary']) ?>
<?= Html::a('Delete', ['delete', 'id' => $model->vipe_codi], [
'class' => 'btn btn-danger',
'data' => [
'confirm' => 'Are you sure you want to delete this item?',
'method' => 'post',
],
]) ?>
</p>
<?= DetailView::widget([
'model' => $model,
'attributes' => [
'vipe_codi',
'vinc_codi',
'pers_auxi',
],
]) ?>
</div>
and my controller
<?php
namespace app\controllers;
use Yii;
use app\models\GeTvipe;
use app\models\GeTvipeSearch;
use yii\web\Controller;
use yii\web\NotFoundHttpException;
use yii\filters\VerbFilter;
/**
* GeTvipeController implements the CRUD actions for GeTvipe model.
*/
class GeTvipeController extends Controller
{
public function behaviors()
{
return [
'verbs' => [
'class' => VerbFilter::className(),
'actions' => [
'delete' => ['post'],
],
],
];
}
/**
* Lists all GeTvipe models.
* @return mixed
*/
public function actionIndex()
{
$searchModel = new GeTvipeSearch();
$dataProvider = $searchModel->search(Yii::$app->request->queryParams);
return $this->render('index', [
'searchModel' => $searchModel,
'dataProvider' => $dataProvider,
]);
}
/**
* Displays a single GeTvipe model.
* @param integer $id
* @return mixed
*/
public function actionView($id)
{
return $this->render('view', [
'model' => $this->findModel($id),
]);
}
/**
* Creates a new GeTvipe model.
* If creation is successful, the browser will be redirected to the 'view' page.
* @return mixed
*/
public function actionCreate()
{
$model = new GeTvipe();
if ($model->load(Yii::$app->request->post()) && $model->save()) {
return $this->redirect(['view', 'id' => $model->vipe_codi]);
} else {
return $this->render('create', [
'model' => $model,
]);
}
}
/**
* Updates an existing GeTvipe model.
* If update is successful, the browser will be redirected to the 'view' page.
* @param integer $id
* @return mixed
*/
public function actionUpdate($id)
{
$model = $this->findModel($id);
if ($model->load(Yii::$app->request->post()) && $model->save()) {
return $this->redirect(['view', 'id' => $model->vipe_codi]);
} else {
return $this->render('update', [
'model' => $model,
]);
}
}
/**
* Deletes an existing GeTvipe model.
* 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();
return $this->redirect(['index']);
}
/**
* Finds the GeTvipe model based on its primary key value.
* If the model is not found, a 404 HTTP exception will be thrown.
* @param integer $id
* @return GeTvipe the loaded model
* @throws NotFoundHttpException if the model cannot be found
*/
protected function findModel($id)
{
if (($model = GeTvipe::findOne($id)) !== null) {
return $model;
} else {
throw new NotFoundHttpException('The requested page does not exist.');
}
}
}
i download the advanced application template so when i go to /localhost/advanced/frontend/views/site/ i get the same error