Show the user model class. Maybe you have a cast or an accessor
Aug 19, 2022
6
Level 1
Laravel 8 returning Boolean instead of field value
Good day I have a table users with name, surname,role,email etc. When i use Auth::user()->name it displays the value correctly but When i use Auth::user()->role it displays 1
All my roles are strings such as "AD" , "SEC , "HOD" but it returns 1
Please or to participate in this conversation.