We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Notes for lesson 13: https://github.com/ratiw/vuetable-2-tutorial/wiki/lesson-13
If you are using this package in laravel for your API https://github.com/santigarcor/laravel-vuetable
You need an extra param called "searchable"
<div class="form-inline"> <input type="text" class="form-control mb-2 mr-sm-2" v-model="searchText" placeholder="Search..." @keyup="search"> </div>
method:
search () { this.moreParams={ searchable: [ 'user.name', 'user.lastname', ], 'filter': this.searchText } Vue.nextTick( () => this.$refs.vuetable.refresh()) },
The text was updated successfully, but these errors were encountered:
Hello @eduardoarandah
I can solve the problem, I'm reviewing the same and I have not been able to find the solution to apply the filter correctly.
At this moment the request is sent to the server but it does not search.
Sorry, something went wrong.
What I did is the following:
public function getUsersForVueDataTable(Request $request) { $request->request->add(['searchable' =>[ 'name', 'email', 'created_at']]); $query = User::select([ 'id', 'name', 'email', 'created_at', ]); return Vuetable::of($query)->make(); }
I do not think it is the most optimal solution but it works correctly.
Because I tried to add the query-params, but this did not work for me:
queryParams: { sort: 'sort', page: 'page', perPage: 'per_page', searchable: [ 'name', 'email', 'created_at', ], },
This is the request object when I use the query-params but it does not take the variable
array:4 [ "sort" => null "page" => "1" "per_page" => "5" "filter" => "andres" ]
No branches or pull requests
Notes for lesson 13:
https://github.com/ratiw/vuetable-2-tutorial/wiki/lesson-13
If you are using this package in laravel for your API
https://github.com/santigarcor/laravel-vuetable
You need an extra param called "searchable"
Example
method:
The text was updated successfully, but these errors were encountered: