I have code to export data to blade template:
namespace App\Exports;
use Illuminate\Contracts\View\View;
use Maatwebsite\Excel\Concerns\FromView;
class InvoicesExport implements FromView
{
public function view(): View
{
return view('exports.invoices', [
'invoices' => Invoice::all()
]);
}
}
Where I should place view file exports.invoices
?
I tried to place it in path: App\Exports
like:
/App/Exports/exports/invoices.blade.php
But Excel can not find this path