The database table is : prefix_adminUsers and I have a model in UserAdmin.php as below:
namespace App\Model;
use Illuminate\Database\Eloquent\Model;
class UserAdmin extends Model
{
protected $table = 'adminUsers';
public $timestamps = false;
}
When I tried to access the same by controller it show me the error:
Illuminate\Database\Eloquent\Builder Object ( [query:protected] => Illuminate\Database\Query\Builder Object ( [connection] => Illuminate\Database\MySqlConnection Object ( [pdo:protected] => PDO Object
my controller is as follows:
use App\Model\UserAdmin;
$userRecord = UserAdmin::where('id', '=', Auth::user()->id);
print_r($userRecord);