I have two tables.
I first need to know the extension in order to get the path for the type. So I have a line of code in my method that looks like this:
// Get path $ext = Extension::where('extension', $extension)->with('hasType')->first(); $path = $ext->hasType->path;
All I need is the path string. Is there a way to make a query using this relationship, but return only the path string of data I am seeking?
Looking to see what all I can do with these relationships.
Or do I need to create a separate method that does this for me, then return the string back to the method that needs it?