3
0
Fork 0

Lot's of bug fixes

This commit is contained in:
BuildTools 2021-06-27 21:01:43 +02:00
parent ad320963fc
commit 7718ed6c32
196 changed files with 51167 additions and 3010 deletions

View file

@ -3,6 +3,7 @@
namespace App;
use App\Cache\Cache;
use Carbon\Carbon;
use Illuminate\Contracts\Auth\MustVerifyEmail;
use Illuminate\Foundation\Auth\User as Authenticatable;
use Illuminate\Notifications\Notifiable;
@ -40,6 +41,12 @@ class User extends Authenticatable implements MustVerifyEmail
'email_verified_at' => 'datetime',
];
public function fixedUUID() {
$uuid = substr_replace($this->uuid, '-', 8, 0);
$uuid = substr_replace($uuid, '-', 13, 0);
$uuid = substr_replace($uuid, '-', 18, 0);
return substr_replace($uuid, '-', 23, 0);
}
private $username;
public function username() {
@ -61,7 +68,7 @@ class User extends Authenticatable implements MustVerifyEmail
'shows.title', 'shows.description', 'shows.image', 'seats.*'
])
->where('seats.uuid', '=', $this->uuid)
->where('seats.date', '>', 'CURRENT_TIMESTAMP()')
->where('seats.date', '>', Carbon::now())
->get()->all();
$this->shows = $shows;
return !empty($shows);
@ -76,7 +83,7 @@ class User extends Authenticatable implements MustVerifyEmail
'shows.title', 'shows.description', 'shows.image', 'seats.*'
])
->where('seats.uuid', '=', $this->uuid)
->where('seats.date', '>', 'CURRENT_TIMESTAMP()')
->where('seats.date', '>', Carbon::now())
->get()->all();
$this->shows = $shows;
return $shows;