Laravel Backpack FIlter Not Called
See original GitHub issueI’m currently working on project using laravel backpack and try to use crud filter on the data. But the function that filtering data not being called after dropdown selected. Here is my
$this->crud->addFilter([ // select2 filter
'name' => 'id_periode',
'type' => 'dropdown',
'label'=> 'Periode'
], function() {
return \App\Models\Periode::all()->pluck('periode', 'id')->toArray();
}, function($value) {
dd($value);
$this->crud->addClause('where', 'id_periode', $value);
});
Is there something wrong with my code or am i missing something ?
Issue Analytics
- State:
- Created 6 years ago
- Comments:20 (10 by maintainers)
Top Results From Across the Web
How to enable filters in Backpack for Laravel?
The simple question is: where must I call $this->crud->filters() ? I tried to add at the end of setupListOperation() in my controller, but...
Read more >Filters PRO :: 5.x Docs
Backpack CRUD allows you to show a filters bar right above the entries table. When selected or modified, they reload the DataTables results....
Read more >BackpackForLaravel/Lobby - Gitter
And so, I have a filter from Ajax on my crud, with this handler: ... It's NOT Backpack, it's Laravel!!! ... whats not...
Read more >backpack crud
Backpack CrudLaravel admin panels and CRUD generators. If your field doesn't have ... Solved] CRUD Laravel Backpack FIlter Not Called.
Read more >Filters::addFilter() - Code Metrics - Laravel-Backpack/CRUD
Importance ; 92, * The filter logic does NOT get applied. ; 93, * ; 94, * @param CrudFilter $object.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Thx that solved the problem for me:
Solution (working for Laravel >= 5.5)
(For older Laravel Versions see https://github.com/fideloper/TrustedProxy)
AppServiceProvider function boot() Make sure that
\URL::forceScheme('https')
must NOT be set.Thanks, @axelzuzek! Worked for me with
protected $proxies = '**';
and SET(!!!)\URL::forceScheme('https')
Laravel 5.6