ispt4.0_laravel/app/Models/GeneralAttributesEquipment.php
ygbanzato 3db065ae53 updating best practices in project models and controllers, and linking tables.
- Creation of controller : CreateProject, for creation of the company works.
- Controller : ProjectDatacontroller to manage data of the equipments and installations in general.
2023-06-03 19:01:17 +01:00

21 lines
520 B
PHP

<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class GeneralAttributesEquipment extends Model
{
use HasFactory;
protected $table = 'general_attributes_equipaments';
protected $primaryKey = 'general_attributes_equipment_id';
public function specificAttributes()
{
return $this->hasMany(SpecificAttributesEquipmentType::class, 'specific_attributes_equipment_type_id', 'general_attributes_equipment_id');
}
}