PHP code example of execut / yii2-crud
1. Go to this page and download the library: Download execut/yii2-crud library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
execut / yii2-crud example snippets
return [
'bootstrap' => [
'yii2-crud' => [
'class' => \execut\crud\Bootstrap::class,
]
]
];
namespace execut\books\controllers;
use execut\books\models\Book;
use execut\crud\params\Crud;
use yii\web\Controller;
class BooksController extends Controller
{
public function actions()
{
$crud = new Crud([
'modelClass' => Book::class,
'modelName' => Book::MODEL_NAME,
]);
return $crud->actions();
}
}
$ php composer.phar