Refactor Plant model to ensure proper formatting and maintain consistency in method definitions
This commit is contained in:
@@ -34,9 +34,9 @@ class Plant extends Model
|
|||||||
}
|
}
|
||||||
|
|
||||||
public function getLineNames()
|
public function getLineNames()
|
||||||
{
|
{
|
||||||
return $this->hasMany(Line::class, 'plant_id', 'id'); // Ensure 'plant_id' is the foreign key in 'lines' table
|
return $this->hasMany(Line::class, 'plant_id', 'id');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function items(): HasMany
|
public function items(): HasMany
|
||||||
{
|
{
|
||||||
@@ -97,4 +97,9 @@ class Plant extends Model
|
|||||||
// {
|
// {
|
||||||
// return $this->hasMany(RejectReason::class, 'plant_id', 'id');
|
// return $this->hasMany(RejectReason::class, 'plant_id', 'id');
|
||||||
// }
|
// }
|
||||||
|
|
||||||
|
public function users()
|
||||||
|
{
|
||||||
|
return $this->hasMany(User::class, 'plant_id', 'id');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user