created Buildplate & Extruder Model
This commit is contained in:
@@ -0,0 +1,29 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Models;
|
||||||
|
|
||||||
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
|
||||||
|
class Buildplate extends Model
|
||||||
|
{
|
||||||
|
// Buildplate Model
|
||||||
|
protected $table = 'buildplates';
|
||||||
|
|
||||||
|
protected $fillable = [
|
||||||
|
'name',
|
||||||
|
'description',
|
||||||
|
'manufacturer_id',
|
||||||
|
'temp_max'
|
||||||
|
];
|
||||||
|
|
||||||
|
public function filament()
|
||||||
|
{
|
||||||
|
return $this->hasMany(Filament::class);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function manufacturer()
|
||||||
|
{
|
||||||
|
return $this->belongsTo(Manufacturer::class);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Models;
|
||||||
|
|
||||||
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
|
||||||
|
class Extruder extends Model
|
||||||
|
{
|
||||||
|
// Extruder Model
|
||||||
|
protected $table = 'extruders';
|
||||||
|
|
||||||
|
protected $fillable = [
|
||||||
|
'name',
|
||||||
|
'description',
|
||||||
|
'manufacturer_id',
|
||||||
|
'diameter',
|
||||||
|
'temp_min',
|
||||||
|
'temp_max'
|
||||||
|
];
|
||||||
|
|
||||||
|
public function manufacturer()
|
||||||
|
{
|
||||||
|
return $this->belongsTo(Manufacturer::class);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user