Category : fillable

I want generate a pdf file to the customer that can edit it and then download it, I use Laravel 8, mpdf 0.8.15, niklasravnsborg/laravel-pdf 4.1 and php 7.4 I tried this code with mpdf package in controller : $html = file_get_contents(resource_path(‘views/app/pdf/inventory/inventory2.blade.php’)); $pdf = new MpdfMpdf(); $pdf = Mpdf::loadView(‘app.pdf.inventory.inventory2’); $pdf->useActiveForms = true; $pdf->WriteHTML($html); return $pdf->Output(); // ..

Read more

I have table with below fields. Only name is required and rest of them is optional ‘name’,’no_of_color’,’offset_printing_rate’,’screen_printing_rate’,’positive_rate’,’regular_plate_rate’,’big_plate_rate’, My model protected $fillable = [ ‘name’, ‘no_of_color’, ‘offset_printing_rate’, ‘screen_printing_rate’, ‘positive_rate’, ‘regular_plate_rate’, ‘big_plate_rate’, ]; but when I don’t fill optional field it returns error SQL: insert into table_name (name, no_of_color, offset_printing_rate, screen_printing_rate, positive_rate, regular_plate_rate, big_plate_rate, updated_at, created_at) values ..

Read more