updated models
This commit is contained in:
21
app/Models/Company.php
Normal file
21
app/Models/Company.php
Normal file
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\HasMany;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
|
||||
class Company extends Model
|
||||
{
|
||||
use SoftDeletes;
|
||||
|
||||
protected $fillable = [
|
||||
'name',
|
||||
];
|
||||
|
||||
public function plants(): HasMany
|
||||
{
|
||||
return $this->hasMany(Plant::class);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user