pint run
This commit is contained in:
1 parent
00bcaa2b93
commit
1559580ceb
37 files changed
+211
-162
No files matched your search
+1
-2
@@ -7,11 +7,10 @@ use Illuminate\Database\Eloquent\Relations\BelongsToMany;
|
||||
|
||||
class Belt extends Model
|
||||
{
|
||||
protected $fillable = ["name"];
|
||||
protected $fillable = ['name'];
|
||||
|
||||
public function courses(): BelongsToMany
|
||||
{
|
||||
return $this->belongsToMany(Course::class);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -2,22 +2,20 @@
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use App\Models\Kid;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsToMany;
|
||||
|
||||
class Course extends Model
|
||||
{
|
||||
protected $fillable = ["name", "duration"];
|
||||
protected $fillable = ['name', 'duration'];
|
||||
|
||||
public function kids(): BelongsToMany
|
||||
{
|
||||
return $this->belongsToMany(Kid::class)->withPivot("date");
|
||||
return $this->belongsToMany(Kid::class)->withPivot('date');
|
||||
}
|
||||
|
||||
public function belts(): BelongsToMany
|
||||
{
|
||||
return $this->belongsToMany(Belt::class);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -13,5 +13,4 @@ class Group extends Model
|
||||
{
|
||||
return $this->belongsToMany(User::class);
|
||||
}
|
||||
|
||||
}
|
||||
+2
-2
@@ -7,10 +7,10 @@ use Illuminate\Database\Eloquent\Relations\BelongsToMany;
|
||||
|
||||
class Kid extends Model
|
||||
{
|
||||
protected $fillable = ["name", "email"];
|
||||
protected $fillable = ['name', 'email'];
|
||||
|
||||
public function courses(): BelongsToMany
|
||||
{
|
||||
return $this->belongsToMany(Course::class)->withPivot("date");
|
||||
return $this->belongsToMany(Course::class)->withPivot('date');
|
||||
}
|
||||
}
|
||||
@@ -6,21 +6,19 @@ use App\Observers\OrderObserver;
|
||||
use Illuminate\Database\Eloquent\Attributes\ObservedBy;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
use App\Models\Orderstatus;
|
||||
|
||||
#[ObservedBy([OrderObserver::class])]
|
||||
class Order extends Model
|
||||
{
|
||||
protected $fillable = ["name", "url", "count", "orderstatus_id", "orderdatetime", "user_id"];
|
||||
protected $fillable = ['name', 'url', 'count', 'orderstatus_id', 'orderdatetime', 'user_id'];
|
||||
|
||||
public function user(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(User::class);
|
||||
}
|
||||
|
||||
public function orderstatus(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(Orderstatus::class);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -13,5 +13,4 @@ class Role extends Model
|
||||
{
|
||||
return $this->belongsToMany(User::class);
|
||||
}
|
||||
|
||||
}
|
||||
+1
-1
@@ -4,9 +4,9 @@ namespace App\Models;
|
||||
|
||||
// use Illuminate\Contracts\Auth\MustVerifyEmail;
|
||||
|
||||
use Database\Factories\UserFactory;
|
||||
use Filament\Models\Contracts\FilamentUser;
|
||||
use Filament\Panel;
|
||||
use Database\Factories\UserFactory;
|
||||
use Illuminate\Database\Eloquent\Attributes\Fillable;
|
||||
use Illuminate\Database\Eloquent\Attributes\Hidden;
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
|
||||
Reference in new issue
Block a user