jacquestvanzuydam / laravel-firebird

Firebird Illuminate package for Laravel 5
63 stars 93 forks source link

Eloquent doesnt work correctly #80

Closed william-cwb closed 2 years ago

william-cwb commented 2 years ago

When I do query, i need to do json_decode($model) to access attributes from table.

image

But, when I do parse, I can't access attributes from Eloquent.

How can I fix this?

KKSzymanowski commented 2 years ago

Why do you need to json_decode? You can simply access the attributes like object properties:

$customer = TbCliente::find($request['id']);
dump($customer->id);
jacquestvanzuydam commented 2 years ago

@KKSzymanowski is correct, you shouldn't need to decode the object.

Please try one of the forked projects, as this one is abandoned.