Add new models and page for motions
This commit is contained in:
31
app/Models/Organ.php
Normal file
31
app/Models/Organ.php
Normal file
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class Organ extends Model
|
||||
{
|
||||
protected $table = 'organ';
|
||||
|
||||
protected $primaryKey = 'id';
|
||||
|
||||
public $timestamps = false;
|
||||
|
||||
protected $fillable = [
|
||||
'id',
|
||||
'kod',
|
||||
'namn',
|
||||
'typ',
|
||||
'status',
|
||||
'sortering',
|
||||
'namn_en',
|
||||
'domän',
|
||||
'beskrivning',
|
||||
];
|
||||
|
||||
public function personUppdrag()
|
||||
{
|
||||
return $this->hasMany(PersonUppdrag::class, 'organ_kod', 'kod');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user