I am looking for something which can be like findOrDo(). Like do this when data not found. Something could be like
Model::findOrDo($id,function(){ return \"Da
as of Laravel v5.7, you can do this (the retrieving single model variation of @thewizardguy answer)
// $model will be null if not found $model = Model::where('id', $id)->first(); if($model) { doActions(); }