Category : php

i have two php verison on my centos8 ; php8.0 -> defualt use php7.4 -> for someone v.host php-fpm i try to rum phpmyadmin and see : Composer detected issues in your platform: Your Composer dependencies require the following PHP extensions to be installed: mysqli, xml in my php.ini mysql extension enabled but on moadule ..

Read more

I am working on a registration form with Laravel 8 and Vue 3. The back-end is an API. In the users table migration file I have: class CreateUsersTable extends Migration { public function up() { Schema::create(‘users’, function (Blueprint $table) { $table->id(); $table->string(‘first_name’); $table->string(‘last_name’); $table->string(’email’)->unique(); $table->timestamp(’email_verified_at’)->nullable(); $table->string(‘password’); $table->unsignedInteger(‘country_id’)->nullable(); $table->foreign(‘country_id’)->references(‘id’)->on(‘countries’); $table->rememberToken(); $table->timestamps(); }); } // More code ..

Read more

I have three models, User, Post and Comment. User and Post are in a One-To-Many relationship, and so are User and Comment. For the sake of this example, there isn’t a Post–Comment relationship. When I run the following query User::withCount([‘posts’, ‘comments’])->get() I obtain the expected results: [ … AppModelsUser {#3459 id: 18, username: "Foo", created_at: ..

Read more

I need to add the customer delivery and billing vat_number on the invoice generated by prestashop. I’ve tryed to modify my classes/pdf/HTMLTemplateInvoice.php adding ‘customer_vat_number’ => $invoice_address->vat_number like that: $data = array( ‘order’ => $this->order, ‘order_invoice’ => $this->order_invoice, ‘order_details’ => $order_details, ‘carrier’ => $carrier, ‘cart_rules’ => $cart_rules, ‘delivery_address’ => $formatted_delivery_address, ‘invoice_address’ => $formatted_invoice_address, ‘addresses’ => array(‘invoice’ ..

Read more