How to Filter in own module Datatable Class

Laraship QuestionsCategory: TechnicalHow to Filter in own module Datatable Class
jedjie asked 5 years ago


How can I make a filter related to the Datatable Class before rendering into the view based on the related tables id/foreign key that has been chosen that I can specify in my Controller class? Kindly help. Thnak you in advance.

for example here is my related tables that I am trying to show in my ParentsController.


  • @param Child $child
  • @param ChildsDataTable $dataTable
  • @return Child


    public function show_childs(Parent $parent, Child $child, ChildsDataTable $dataTable)


    $child = $parent->childs;



1 Answers
Best Answer
laraship Staff answered 5 years ago


This is not a best practise way to show HasMany relations, we recommend you to check the slider module and see how slides are showing for a specific Slider