You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<?phpnamespaceApp\Models;
useIlluminate\Http\Request;
useBizhub\QueryFilter\Filterable;
useIlluminate\Foundation\Auth\UserasAuthenticatable;
class User extends Authenticatable
{
use Filterable;
}
3. Use filter scope
<?phpnamespaceApp\Http\Controllers;
useApp\Models\User;
useIlluminate\Http\Request;
useInertia\Inertia;
class UserController extends Controller
{
/** * Get list of users * * @param Request $request * @return \Inertia\Response */publicfunctionindex(Request$request)
{
return Inertia::render('Users/Index', [
'users' => User::filter()->paginate()
]);
}
}