#Laravel trashed function not found

1 messages · Page 1 of 1 (latest)

marsh socket
#

ups

#

it worked when is used ->first() instead of ->get() 🙂

torn grail
#

yes, get gives you collection

marsh socket
#

but is there an alternative when i want multiple rows?

torn grail
#

you deleted your code, so i don't remeber what you wanted to do, but mostly you get collection and then loop over it

marsh socket
#
            $result = $this->fileModel->withTrashed()->where('path', $this->path)->where('name', $name)->where('disk', 'local')->first();

and check if it is trashed

#

that makes sense

#

thanks