22 lines
377 B
PHP
22 lines
377 B
PHP
<?php
|
|
|
|
namespace App;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class BioRack extends Model
|
|
{
|
|
protected $table = 'bio_racks';
|
|
protected $guarded = [];
|
|
|
|
public function cabinet()
|
|
{
|
|
return $this->belongsTo(BioCabinet::class, 'cabinet_id');
|
|
}
|
|
|
|
public function specimens()
|
|
{
|
|
return $this->hasMany(BioSpecimen::class, 'rack_id');
|
|
}
|
|
}
|