print_r(): Property access is not allowed yet or var_dump(): Property access is not allowed yet in laravel php

print_r(): Property access is not allowed yet or var_dump(): Property access is not allowed yet in laravel php

to solve print_r(): Property access is not allowed yet or var_dump(): Property access is not allowed yet in laravel, before print_r we need to add @ symbol like @print_r or @var_dump

Code :

Final :