Here is my code:
return PDF::loadFile($url)
->setPaper('a4')
->setOption('margin-top', 10)
->stream('somefile.pdf');
As I am calling this method on multiple locations, is there some kind of option to call it in a way like this?
return PDF::loadFile($url)
->callSettings()
->stream('somefile.pdf');
Where the settings are ->setPaper('a4')->setOption('margin-top', 10)
.