Closed masterix21 closed 1 week ago
Hi.
Using your package, I'm facing the error Strings with invalid UTF-8 byte sequences cannot be escaped..
Strings with invalid UTF-8 byte sequences cannot be escaped.
I've added the column uuid to my users table like so:
uuid
Schema::table('users', function (Blueprint $table) { $table->efficientUuid('uuid')->after('id')->unique(); });
Then, I've changed the User model like so:
User
class User extends Authenticatable implements MustVerifyEmail, Subscriber { // ... other traits ... use GeneratesUuid; // ... protected function casts(): array { return [ 'uuid' => EfficientUuid::class, 'email_verified_at' => 'datetime', ]; } }
After all, I've created in the web.php an endpoint like this:
web.php
Route::get('/test', function () { return response()->json( User::create([ 'first_name' => fake()->firstName(), 'last_name' => fake()->lastName(), 'email' => fake()->email, 'mobile' => fake()->phoneNumber(), 'password' => Hash::make('password'), ]) ); });
Finally, the result with /test is:
/test
Do you happen to have an idea to solve this?
Thanks!
Found! The issue is caused by Telescope.
Hi.
Using your package, I'm facing the error
Strings with invalid UTF-8 byte sequences cannot be escaped.
.I've added the column
uuid
to my users table like so:Then, I've changed the
User
model like so:After all, I've created in the
web.php
an endpoint like this:Finally, the result with
/test
is:Do you happen to have an idea to solve this?
Thanks!