Advanced Search
Search Results
6 total results found
CRUD maken met Gii
Create CRUD Example Invullen (in dit voorbeeld is het model examen al gemaakt, examen is een tabel in de database). Model Class app\models\Examen Search Model Class app\models\ExamenSearch Controller Class app\controllers\ExamenController View path le...
Buttons Redirect
Example Buttons //Cancel <?= Html::a('Cancel', ['index'], ['class'=>'btn btn-primary', 'title'=> 'Mouse over Text',]) ?> //Delete <?= Html::a('Delete', ['delete', 'id' => $model->id], [ 'class' => 'btn btn-danger', 'data' => [ ...
Useful Links
Useful Links Useful extensions https://wbraganca.com/yii2extensions Sorting/filtering in model met relaties https://www.yiiframework.com/wiki/653/displaying-sorting-and-filtering-model-relations-on-a-gridview Bootstrap (4) Icons https://www.w3schools.com...
Active Records - Queries naar DB
Active Records select $examen = examen::find()->where(['actief' => '1'])->orderBy(['datum_van' => 'SORT_DESC'])->one(); $examen = examen::find()->where(['actief' => '1'])->orderBy(['datum_van' => 'SORT_DESC'])->all(); $gesprekSoort = gesprekSoort::find...
Login via DB
Maak eenĀ database tabel CREATE TABLE `tbl_user` ( `id` int(11) NOT NULL, `username` varchar(128) NOT NULL, `password` varchar(128) NOT NULL, `authKey` varchar(200) DEFAULT NULL, `role` varchar(20) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=...
GridView Widget
GridView Widget Make item clickable link [ 'attribute'=>'naam', 'label' => 'Studentnaam', 'contentOptions' => ['style' => 'width:600px; white-space: normal;'], 'format' => 'raw', 'value' => function ($data) { return Html::a(...