Posts

Showing posts with the label composer

Laravel Dompdf Installation

Image
 Laravel Dompdf     Installation   Dompdf is Laravel Package to generate Pdf files.  Follow the steps after successfull installation of Laravel into Your Computer   step 1 : Enter the following command, this will install the dompdf into your laravel project   composer require barryvdh/laravel-dompdf   step 2 : After Installation and updating composer add the following lines to register provider in bootstrap/app.php  $app->register(\Barryvdh\DomPDF\ServiceProvider::class);     Step 3 : Craete a blade file in views for pdf layout in my case its pdf.invoice.blade.php add the html code here Step 4 : Add the Following Code into your Controller   use Barryvdh\DomPDF\Facade\Pdf; $pdf=PDF::loadView('pdf.invoice', $data); return $pdf->download('invoice.pdf') ;     Now you can run the laravel project and route to the above contoller to Generate the PDF files

Laravel Installation Using Composer

Image
Laravel Installation Using Composer Make sure you have installed composer in your machine To check Installation By using command prompt Enter C:\> Composer If Not Download From  https://getcomposer.org/download/  Go to the directory where you want to install Laravel and Enter  The Following Command   composer create-project laravel/laravel  first-laravel-app   Laravel project will be created with the folder name first-laravel-app To run laravel app go to inside the Laravel app folder and enter the following command php artisan serve     after the following command you see the above screen which will provide url to access your laravel project copy and paste on your browser you will see the laravel screen. Congratualtion you have successfully installed and run the laravel project