Laravel 5 Filter Results Based on URL Param

This is an example of how I managed to Filter results based on a URL Param and many to many relationship but still showing Laravels ORM model relationships. So in short your model relationship objects (specializations) should still be attached to the main model (user) in the query results but it filters the user results and NOT the specializations.

In controller:

In routes:



Sam Deering

Sam Deering is a web developer from England (currently living in Australia). In his spare time he enjoys coding, playing chess, reading and investing.

Leave a Reply

Your email address will not be published. Required fields are marked *