You have not lived today until you have done something for someone who can never repay you. - John Bunyan
Id | Name | Created At | Updated At |
---|
php artisan datatables:scope UserDataTableScope
namespace App\DataTables\Scopes;
use Yajra\Datatables\Contracts\DataTableScopeContract;
class UserDataTableScope implements DataTableScopeContract
{
public function apply($query)
{
return $query->whereBetween('id', [500, 550]);
}
}
public function getUsers(UsersDataTable $dataTable)
{
return $dataTable->addScope(new UserDataTableScope)->render('path.to.view');
}