Compression plugin with Laravel mix

I want to generate compressed resources files (br, or gz) after npm run prod with laravel. At the end of my webpack.mix.js : const CompressionPlugin = require(‘compression-webpack-plugin’); mix.webpackConfig({ plugins: [ new CompressionPlugin({ filename: ‘[path].br[query]’, algorithm: ‘brotliCompress’, test: /\.(js|css|html|svg)$/, compressionOptions: { level: 11 }, threshold: 2048, minRatio: 0.8, deleteOriginalAssets: false, }), ] }); I want to…

Save input fields in another table in Laravel

So what i have right now: a CRUD application: a Registration table and form, and an Extraregistration table where i want to save some of the fields from the registration. The Extraregistration table has a registration_id. RegistrationController $registration->ris_firstname = $request->firstname; $registration->ris_lastname= $request->lastname; $registration->ris_email = $request->email; html <label>Firstname</label> <input type=”text” name=”firstname” id=”firstname” class=”form-control” data-blocked=”<>{}” value=”” required>…

How to get double request name to array in laravel?

Result from MODAL: Result from FORM: DESCRIPTION: So I wanna make a FORM from MODAL that will send data to actual FORM’s table, but at the first IMAGE that not send like the FORM one. CODE: This is code from FORM attribute: public function setLandCertificateIdAttribute($values) { // dd($values); $this->attributes[‘land_certificate_id’] = implode(‘,’, $values); } This is…

Call to a member function addDays() on string on Laravel 6

I have a store function. In the store function, I want to create a date format using carbon. You can see this code here: public function store_cuti(Request $request) { $end = $request->tgl_mulai->addDays(3); $users = new Data_cuti; $users->user_id = $request->user_id ; // users_id $users->nama_surat = $request->nama_surat ; $users->tgl_surat = $request->tgl_surat ; $users->durasi_cuti = $request->durasi_cuti ; //…