PHP code example of goodizer / yii2-helpers

1. Go to this page and download the library: Download goodizer/yii2-helpers 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/ */

    

goodizer / yii2-helpers example snippets


use goodizer\helpers\GridSearchHelper;
use yii\grid\GridView;

$searchData = GridSearchHelper::search(new Note());
echo GridView::widget([
	'columns' => [
		'id',
		'name',
		'etc',
	],
    'filterModel' => $searchData->filterModel,
    'dataProvider' => $searchData->dataProvider,
]);

use goodizer\helpers\DbSyncHelper;

$sync = new DbSyncHelper([
  'common\models',
  'modules\admin\models',
  'some\another\namespace',
]);
$sync->run();

$ php composer.phar