mirror of
https://git.meshkee.com/cssd/cssd-back.git
synced 2026-10-12 18:51:07 +03:30
fix: change models namespace
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsToMany;
|
||||
|
||||
class Cycle extends Model
|
||||
{
|
||||
public $fillable = [
|
||||
'date', 'user_id', 'cycle_number', 'sterilizer_id', 'note', 'verified', 'unique_id'
|
||||
];
|
||||
|
||||
public function user(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(User::class);
|
||||
}
|
||||
|
||||
public function labels(): BelongsToMany
|
||||
{
|
||||
return $this->belongsToMany(Label::class, 'cycle_label')
|
||||
->withPivot('count');
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user