Laravel Tinker on php 7.2.19

161 Views Asked by At

Tinker in laravel closes itself everytime when I try to get a result of a command harder than 1+1.

Laravel: 5.5.38

php: 7.2.19

enter image description here

2

There are 2 best solutions below

3
On

You have to use like this

$user = \App\User::find(1);

Or

$user = App\User::find(1);
0
On

If anyone will get the same exeption, check your connection to databases in env file better, because i spent 3 hours for resolving my own mistake.