Clean up a bunch of code and improve transaction store events

This commit is contained in:
James Cole
2026-01-25 09:02:47 +01:00
parent 22b97ce8ef
commit f5a929d72e
36 changed files with 396 additions and 100 deletions

View File

@@ -86,8 +86,11 @@ class User extends Authenticatable
/**
* @throws NotFoundHttpException
*/
public static function routeBinder(string $value): self
public static function routeBinder(self|string $value): self
{
if($value instanceof self) {
$value = (int)$value->id;
}
if (auth()->check()) {
$userId = (int) $value;
$user = self::find($userId);