For example, there is a file \resources\views\test.blade.php
:
@extends('layouts.app')
@section('content')
<div class="container">
{{ $article->content }}
</div>
@endsection
I want to save it as \resources\views\html\test.html
. What should I do?
I would try something like this, although I haven't test it my self:
File::put('test.html',
view('resources.views.test')
->with(["article" => $article])
->render()
);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With