skip to Main Content

Laravel seeder dont fill table with foreing keys

I'm working on a Laravel project, and I have the following migrations: public function up(): void { Schema::create('customers', function (Blueprint $table) { $table->id('customer_id'); $table->string('first_name', 50); $table->string('last_name', 50); $table->string('address', 100)->nullable(); $table->string('phone', 15)->nullable(); $table->string('email', 50)->unique(); $table->timestamp('registration_date')->default(DB::raw('CURRENT_TIMESTAMP')); $table->timestamps(); }); } /** * Reverse…

VIEW QUESTION

Laravel and Vue have performance error with LCP

I have a project with Laravel v6 (mix) and vueJs v2 It has LCP error My website LCP is a hero image that I used it like this <picture> <source media="(min-width: 1536px)" :srcset="getAssetPath('/v2/assets/images/home-new.webp')" type="image/webp"> <source media="(min-width: 1280px)" :srcset="getAssetPath('/v2/assets/images/home-bg-1535.webp')" type="image/webp"> <source…

VIEW QUESTION

Laravel – Login Route and Controller

My Blade file code is like below. <form action="{{ route('login') }}" method="post" class="row mt-4 align-items-center"> <input type="hidden" name="_token" value="{{ csrf_token() }}"> <div class="mb-3 col-sm-12"> <label class="form-label">Email Address <span class="text-danger">*</span></label> <input type="email" name="email" class="form-control" placeholder="Enter your email"> </div> <div class="mb-3 col-sm-12">…

VIEW QUESTION

Laravel Str::orderedUuid() vs uuid 7

Laravel has a Str::orderedUuid() method that the trait HasUuids uses by default. I understand that uuids from this method can be sorted lexicographically and it helps databases indexation. https://laravel.com/docs/11.x/eloquent#uuid-and-ulid-keys By default, The HasUuids trait will generate "ordered" UUIDs for your…

VIEW QUESTION

Jquery – laravel datatable takes long time to load with only two records

i have the following code with only 2 records of data my controller : if (request()->ajax()){ $spareparts = Sparepart::select(DB::raw('DATE_FORMAT(spareparts.created_at,"%d-%m-%Y") as order_date'), DB::raw("CONCAT(users.address, ', ', regencies.name, ', ', districts.name, ', ', provinces.name) as address"), DB::raw("CONCAT(shipping_addresses.full_address, ', ', r.name, ', ', d.name,…

VIEW QUESTION
Back To Top
Search