Fixed the error when the resource didin't contain a certain element (e.g. format). Thanks Laravel for the teniary blade synbtax!