find()->where in laravel code example
Example 1: laravel find by
$flight = App\Flight::find(1);
$flight = App\Flight::where('active', 1)->first();
$flight = App\Flight::firstWhere('active', 1);
Example 2: laravel "query()->find"
The find Method
If you are overriding the find method in your own models and calling parent::find() within your custom method, you should now change it to call the find method on the Eloquent query builder:
public static function find($id, $columns = ['*'])
{
$model = static::query()->find($id, $columns);
return $model;
}