1. Go to this page and download the library: Download cuongnd88/lara-query-kit 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/ */
public function listTableColumns()
{
$columns = User::getTableColumns();
dump($columns);
}
. . . .
use App\Traits\QueryKit;
class User extends Authenticatable
{
use Notifiable;
use HasOtpAuth;
use HasGuardian;
use QueryKit;
protected $excludable = ['deleted_at', 'created_at', 'updated_at'];
. . . .
}
public function listUsers()
{
$data = User::exclude()->get()->toArray();
dump($data);
}
public function listUsers()
{
$users = User::exclude(['deleted_at', 'created_at', 'updated_at'])
->get()->toArray();
dump($users);
}
. . . .
use App\Traits\QueryKit;
class User extends Authenticatable
{
use Notifiable;
use HasOtpAuth;
use HasGuardian;
use QueryKit;
protected $filterable = [
'id' => ['whereBetween'],
'email',
'name' => ['orWhere', 'LIKE', '%{name}%'],
];
. . . .
}