- Creation of controller : CreateProject, for creation of the company works. - Controller : ProjectDatacontroller to manage data of the equipments and installations in general.
20 lines
368 B
PHP
20 lines
368 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class Unit extends Model
|
|
{
|
|
use HasFactory;
|
|
|
|
protected $table = 'units';
|
|
|
|
protected $primaryKey = 'unit_id';
|
|
public function equipments(){
|
|
|
|
return $this->hasMany(Equipment::class, 'unit_id', 'unit_id');
|
|
}
|
|
}
|