Now that we have our Quotes being created, we should have the ability to generate a PDF and send it to our customer:

In this lesson, we will do the following:
- Create a view page for our Quote - this will be a page to preview PDF
- Install and modify a PDF generation package
- Create a controller to generate the PDF (both preview and download)
Creating a Simple View Page for Quote
We can quickly create a new View page by running the following command:
php artisan make:filament-page ViewQuote --resource=QuoteResource --type=ViewRecord
This will generate a file, but we still need to register it in our Resource:
app/Filament/Resources/QuoteResource.php
// ... public static function table(Table $table): Table { return $table // ... ->bulkActions([ Tables\Actions\BulkActionGroup::make([ Tables\Actions\DeleteBulkAction::make(), ]), ]); ]) ->recordUrl(function ($record) { return Pages\ViewQuote::getUrl([$record]); }); } public static function getPages(): array{ return [ 'index' => Pages\ListQuotes::route('/'), 'create' => Pages\CreateQuote::route('/create'), 'view' => Pages\ViewQuote::route('/{record}'), 'edit' => Pages\EditQuote::route('/{record}/edit'), ];}
Now we can click on the row, and we should see our new page:

That's it for now. Next, we will generate the PDF and display it on the View page.
Installing PDF Package
Next, we will install a package Laravel Invoices to deal with the invoice generation itself:
Note: This can be replaced with any other package or just pure DomPDF
composer require laraveldaily/laravel-invoices:^3.1
Then, we need to publish the package files:
php artisan invoices:install
This will create...
i culd not install composer require laraveldaily/laravel-invoices:^3.0 but had success with composer require laraveldaily/laravel-invoices:^3.1
Hmm, I think I made a mistake here. Updating!
yea the latest version as of 11/16/2023 is 3.2.0 and their has been a few changes such as where the file resources/lang/vendor/invoices/en/invoice.php is being named and where it is getting put I found it in resources/views/vendor/invoices/templates/default.blade.php
well, actually package now follows laravel change, it was due
https://laravel.com/docs/9.x/upgrade#the-lang-directory
Ok I am using Laravel 10.32.1; I am VERRY SORRY I was looking in the wrong file I have found the lang file in the resources NOT in the views file my bad! Found it after I tuck a brake "to many hours on the computer".