init project
This commit is contained in:
27
app/Models/Role.php
Normal file
27
app/Models/Role.php
Normal file
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
|
||||
class Role extends BaseModel
|
||||
{
|
||||
public $timestamps = false;
|
||||
use HasFactory;
|
||||
/**
|
||||
* The table associated with the model.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
|
||||
public static function boot()
|
||||
{
|
||||
parent::boot();
|
||||
}
|
||||
|
||||
protected $fillable = ['name_en', 'lab_id'];
|
||||
|
||||
public function lab(){
|
||||
return $this->belongsTo(Laboratory::class, 'lab_id');
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user