33 lines
607 B
PHP
33 lines
607 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class FormulaParameter extends Model
|
|
{
|
|
use HasFactory;
|
|
|
|
protected $fillable = [
|
|
'formula_id',
|
|
'parameter_id',
|
|
];
|
|
|
|
/**
|
|
* Relationship to MasterFormula
|
|
*/
|
|
public function formula()
|
|
{
|
|
return $this->belongsTo(MasterFormula::class, 'formula_id');
|
|
}
|
|
|
|
/**
|
|
* Relationship to MasterParameter
|
|
*/
|
|
public function parameter()
|
|
{
|
|
return $this->belongsTo(MasterParameter::class, 'parameter_id');
|
|
}
|
|
}
|