$user >id Show 0 In Blade Laravel 8

[Solved] $user >id Show 0 In Blade Laravel 8 | Php Frameworks Laravel - Code Explorer | yomemimo.com
Question : $user->id show 0 in blade laravel 8

Answered by : hassan-silkhi

Set $incrementing to false on your model.
public $incrementing = false;
The casts system checks if this is set to true, if it is, it will try to cast the the key field to an int.

Source : | Last Update : Mon, 02 May 22

Answers related to $user >id show 0 in blade laravel 8

Code Explorer Popular Question For Php Frameworks Laravel