Note the difference being at resources/views - I don’t understand they sage? Has the wrong directory when using a dynamic path.
Otherwise, how will I tell the file to search the path on its own? So far this is annying because I need to comment this each time I push the change, and then change it back so it works on localhost, and its in multiple files I have to do this.
__FILE__ returns the current file being executed. The blade files you create are never actually executed: they are used as markup to generate php files, and those are executed. Those generated php files are in the storage folder you see there.
Can you explain why you need the full system path of a blade? There may be another way to solve your problem.
Because when I try to grab a file from blocks, a directory I created, it seems I need to get the full path, same goes in digital ocean. So what I do is comment in/out the flexible content path each time on multiple templates.
It looks like you’re trying to rebuild basic blade functionality. Why can’t you use @include( 'blocks.' . $layoutConverted )? That should have exactly the same result without needing to determine the full path.