Added packet debug on web UI

This commit is contained in:
Deon George
2021-06-29 20:43:29 +10:00
parent dc86f7c008
commit 987b4040fb
17 changed files with 1095 additions and 792 deletions

View File

@@ -46,5 +46,17 @@ class AppServiceProvider extends ServiceProvider
return NULL;
});
// When a query should return 1 object, or NULL if it doesnt
Builder::macro('singleOrNew',function ($args) {
//dd(['func'=>func_get_args(),'args'=>$args,'this'=>$this]);
$result = $this->where($args)->get();
if ($result->count() == 1) {
return $result->first();
}
return $this->newModelInstance($args);
});
}
}