Eager load form relations

pepijn - 3 months ago


I know I can eager load stuff in a TableBuilder, using the syntax below, but it seems this is not respected for the FormBuilder. As a result, a ton of queries get executed, and this admin page feels really slow.

How can I eager load form relations ?

 protected $options = [
        'eager' => [


ryanthompson - 3 months ago

You can eager load relations using protected $with = [relations]; in your model just like normal Laravel.