Hi
Is there anyway to determine that specific data load from table instead of all data in the admin panel ?
Sorry don't quite understand? Could you maybe give an example of what's wrong please?
By default this package load all data from a table in database. I want to limit it . for example we have a Book Model . I want just show the books with specific category in table view, not all books ? Is it clear ?
Ah okay, yes I think I understand.
You can use the addClause functionality or filters.
Clauses look like
// ------ ADVANCED QUERIES
$this->crud->addClause('active');
$this->crud->addClause('type', 'car');
$this->crud->addClause('where', 'name', '==', 'car');
$this->crud->addClause('whereName', 'car');
$this->crud->addClause('whereHas', 'posts', function($query) {
$query->activePosts();
});
$this->crud->orderBy();
$this->crud->groupBy();
$this->crud->limit();
and filters are documented here -> https://laravel-backpack.readme.io/docs/filters
Hopefuly that should give what you're after, I'll close the thread now to keep the place tidy, feel free to reply
Most helpful comment
Ah okay, yes I think I understand.
You can use the
addClausefunctionality or filters.Clauses look like
and filters are documented here -> https://laravel-backpack.readme.io/docs/filters
Hopefuly that should give what you're after, I'll close the thread now to keep the place tidy, feel free to reply