Skip to content
New issue

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

Request: Eloquent implementation Demo #27

Closed
nacr opened this issue Apr 5, 2016 · 2 comments
Closed

Request: Eloquent implementation Demo #27

nacr opened this issue Apr 5, 2016 · 2 comments
Labels

Comments

@nacr
Copy link

nacr commented Apr 5, 2016

Hello is it possible to have a Eloquent implementation demo available?

Tks

@matfish2
Copy link
Owner

matfish2 commented Apr 6, 2016

Using the class is pretty straight forward:
A. include the class and interface in your project under some folder (say 'VueTables')
B. namespace them accordingly.
C. Declare a route whose url you will pass to the url property on v-server-table
D. in the controller handling the request instantiate the class and call the get method on it. E.g:

$model = new Post;
$columns = ['id','title', 'body', 'author'];

return (new EloquentVueTables())->get($model, $columns);

The class will extract the request data and run the appropriate query on the model.

@nacr
Copy link
Author

nacr commented Apr 6, 2016

ok I will five it a go and give feed back.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants