We’ll go into the command line to create a new entry in posts:
php artisan tinker
Now find a record:
$post = App\Models\Post::find(4);
To use constraints write:
$post = App\Models\Post::where('id',4)->first();
$post = App\Models\Post::whereId(4)->first();