started work on OTP and disabled registration
This commit is contained in:
@@ -7,6 +7,7 @@ use Illuminate\Database\Eloquent\Model;
|
||||
class OfficeLocation extends Model
|
||||
{
|
||||
protected $guarded = array('id');
|
||||
protected $table = 'office_locations';
|
||||
|
||||
public function created_by_info(){
|
||||
return $this->hasOne('App\Models\StaffMember', 'id', 'user_id');
|
||||
@@ -15,4 +16,17 @@ class OfficeLocation extends Model
|
||||
// return $this->hasOne('App\Models\StaffMember', 'id', 'country_manager_id');
|
||||
return $this->hasOne('App\Models\StaffMember', 'id', 'country_manager_id');
|
||||
}
|
||||
|
||||
|
||||
|
||||
public function manager()
|
||||
{
|
||||
return $this->belongsTo(StaffMember::class, 'country_manager_id');
|
||||
}
|
||||
|
||||
|
||||
public function documents()
|
||||
{
|
||||
return $this->hasMany(OfficeLocationDocument::class, 'office_location_id');
|
||||
}
|
||||
}
|
||||
|
||||
16
app/Models/OfficeLocationDocument.php
Normal file
16
app/Models/OfficeLocationDocument.php
Normal file
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class OfficeLocationDocument extends Model
|
||||
{
|
||||
protected $table = 'office_location_documents';
|
||||
protected $guarded = [];
|
||||
|
||||
public function location()
|
||||
{
|
||||
return $this->belongsTo(OfficeLocation::class, 'office_location_id');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user