master crud setup
This commit is contained in:
30
app/Models/Location/Location.php
Normal file
30
app/Models/Location/Location.php
Normal file
@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
namespace App\Modules\Models\Location;
|
||||
|
||||
use App\Modules\Models\Registration\Registration;
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class Location extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
protected $table = 'tbl_locations';
|
||||
|
||||
protected $fillable = [
|
||||
'name',
|
||||
'slug',
|
||||
'email',
|
||||
'password',
|
||||
'description',
|
||||
'status',
|
||||
'user_id',
|
||||
];
|
||||
|
||||
public function registrations()
|
||||
{
|
||||
return $this->hasMany(Registration::class,'preffered_location','slug');
|
||||
}
|
||||
|
||||
|
||||
}
|
Reference in New Issue
Block a user