#### Category : uuid

This problem looked so simple for me when I face with it yesterday! But when I didn’t find similar question on google I realized it is not as simple as what I thought!!!So if there is any similar question that I didn’t find since yesterday please let me know. I’m trying to pass data from ..

I am using the following trait to generate UUID’s for my user model. I have setup a listener to the following event: IlluminateAuthEventsLogin. This works when you just normally sign-in to the app (using Laravel Breeze). But when I manually do auth()->user($user) I get back an instance of IlluminateFoundationAuthUser where the keyType is an integer .. Read more I’ve tried almost every remedy that I know of, but it doesn’t work. However, when I use the command php artisan db:seed seed it works as it should General error: 1364 Field ‘uuid’ doesn’t have a default value enter image description here This is my Models: <?php namespace AppModels; use AppEnumsProjectStatus; use IlluminateDatabaseEloquentFactoriesHasFactory; use IlluminateDatabaseEloquentModel; .. Read more Laravel: 7; PHP: 7.4/8.0 In my project I have two related models: User and TimeAccount. Both use UUID for their primary key, the key name is still id. Migrations: class CreateUsersTable extends Migration { public function up() { Schema::create(‘users’, function (Blueprint$table) { $table->uuid(‘id’)->primary(); // snip… }); } // snip… } class CreateTimeAccountsTable extends Migration .. Read more I am making uuid : Uuid::uuid4(); and save in database as track id. Is it possible to create a duplicate uuid? Sourc.. Read more I’m attempting to use UUID’s for my user ID’s in Laravel and to support this I need to modify a vendor migration (in this case the Voyager admin panel) to change the user id type. Is there a way to do this? Sourc.. Read more I’m trying to use Uuids as foreign keys in my database. I want the Admin table to reference the User table. The database is PostgreSQL, but it should work anywway. The Users’ table: Schema::create(‘users’, function (Blueprint$table) { $table->uuid(‘id’)->primary();$table->string(‘name’, 80); $table->string(’email’, 80)->unique(); … }); My Admins’ table: Schema::create(‘administrators’, function (Blueprint$table) { $table->increments(‘id’);$table->uuid(‘fk_user_id’); ..