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".
yeay, finish the course
I have a substantive question, why is there an Invoice and not a Quote ? The invoice is for the items sold and not for the quote
We are using an Invoice based package to generate a Quote, but not to use it as an actual invoice.
It works pretty much the same, with the only difference on what is inside and how it's given to a customer
Ok doing grate up to this point however when installing the latest version 3.2.0 of laraveldaily/ laravel-invoices it is not creating the resources/lang/vendor/invoices/en/invoice.php file. So, where do we make the changes you are telling us to make in this file?
well, actually package now follows laravel change, it was due
https://laravel.com/docs/9.x/upgrade#the-lang-directory
I'm sorry, but I'm really confused here. I checked the article, updated the package and everything still matches. I'm really not sure what you had missmatched there but it seems like it's not an issue at all.
In my version of Laravel the “LANG/VENDOR” file is in its only file under the database and above the PUBLIC and I was able to fix it thanks. It appears as though Filament might have moved it and placed a lot of its files in it.
ps. I have this in a github repository if you want to see it.
I am really confused by what you just said here :) But sure, you can share the repo and I'll take a look.
Some elements are useful, the steps could be more detailed, it may be understood that people already have knowledge and necessary steps and explanations are omitted. But it can be done better!
Thanks for your time to create this incredible course