Support the ongoing development of Laravel.io →
Database Eloquent Installation
Last updated 1 year ago.
0

Try this and see if it will work.

    $ticket = Auth::user()
                ->with('tickets') // load first relation, add a where
                    ->where('id', $id)
                ->with('tickets.ticket_replie.file') // load the stacked relation, add a where
                    ->where('ticket_replie_id', $attachment_id)
                ->firstOrFail();
0

Sign in to participate in this thread!

Eventy

Your banner here too?

Pekinese pekinese Joined 21 Nov 2015

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.