How to generate a .txt file with data from a view

Posted 1 week ago by Philipp


lets say I have a very basic view just containing some text and variables.

<p>some text and {{ $some->variable }}</p>

And I want to generate a Textfile that contains the rendered output...

some text and my variable

and save it to the public folder.

Thank you for your help - even if its just pointing me in the right direction.

Please sign in or create an account to participate in this conversation.

Laracasts Mascot

Hi, Have We Met Yet?

Did you know that, in addition to the forum, Laracasts includes well over 1000 lessons on modern web development? All for the price of one lunch out per month.

Sign Me Up


Reply to

Use Markdown with GitHub-flavored code blocks.