data-viewer-laravel-vuejs
data-viewer-laravel-vuejs copied to clipboard
No rows returned with default query parameters for Laravel 5.5 or above
Issue The api filters will return no rows with default query parameters for your api when used with laravel 5.5 or above.
Fix If you are using latest version of laravel. Please change ($request->has('search_input')) to if($request->filled('search_input')) in line 42 of Helper/Dataviewer.php
Background (Laravel 5.5) The $request->has method will now return true even if the input value is an empty string or null. A new $request->filled method has been added that provides the previous behavior of the has method.
@ashishbatra Thanks I lost touch in laravel php, been playing with vue.js for few months.
@codekerala Nothing to be fixed here. I just added so if someone is facing problem with laravel 5.5 implementation they know it. As the older method will return blank rows.
Also I would like to thank you for the tutorial and the open source code. Its really good. I modified it little bit for my use. I liked the no dependency part and simplicity of it. Must say good work. :)