Okipa / laravel-table

Generate tables from Eloquent models.
MIT License
546 stars 65 forks source link

sortable and searchable problem #23

Closed afkhami7e closed 5 years ago

afkhami7e commented 5 years ago

Hi @Okipa I trace in laravel-table code, after 1 hour, i found a small problem:

If you use Optional Parameters in laravel route, sortable and searchable don't work. Example Optional Parameters route: Route::name('products.index')->get('products/{id?}', 'ProductController@index')

Pay attention to {id?}

Okipa commented 5 years ago

Hey @mehdi7e, thanks for the feedback.
I'll investigate ASAP.

Okipa commented 5 years ago

Hi @mehdi7e, I tried with an index route with an optional param and everything is going well to me.
Could please fork the project and add a test in the tests/Unit/RoutesTest.php file that shows the bug ?

Okipa commented 5 years ago

I close this issue as I couldn't reproduce the issue.
I'll reopen it if the bug is reproduced in a test (see comment above).