question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Laravel Backpack FIlter Not Called

See original GitHub issue

I’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:closed
  • Created 6 years ago
  • Comments:20 (10 by maintainers)

github_iconTop GitHub Comments

5reactions
axelzuzekcommented, Jul 4, 2018

Thx that solved the problem for me:

Solution (working for Laravel >= 5.5)

  1. Configure App\Http\Middleware\TrustProxies;
protected $proxies = '**';
protected $headers = Request::HEADER_X_FORWARDED_ALL;

(For older Laravel Versions see https://github.com/fideloper/TrustedProxy)

AppServiceProvider function boot() Make sure that \URL::forceScheme('https') must NOT be set.

2reactions
sinallcomcommented, Jul 31, 2018

Thanks, @axelzuzek! Worked for me with protected $proxies = '**'; and SET(!!!) \URL::forceScheme('https') Laravel 5.6

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found