1 week ago

Laravel Excel Export Model with Relationship

Posted 1 week ago by Abdifatah

This code only returns the Job Model only.

public function collection()
        $jobs = Job::with("work")->get();
        return $jobs;

I need each model rows with their corresponding child rows to appear inside it , just like nested table.

Please sign in or create an account to participate in this conversation.