inital commit
This commit is contained in:
37
app/Models/RoadPatrolProject.php
Normal file
37
app/Models/RoadPatrolProject.php
Normal file
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use App\Traits\ReportAble;
|
||||
|
||||
class RoadPatrolProject extends Model
|
||||
{
|
||||
use ReportAble;
|
||||
|
||||
protected $fillable = [
|
||||
'user_id',
|
||||
'start_lat',
|
||||
'start_lng',
|
||||
'end_lat',
|
||||
'end_lng',
|
||||
'project_distance',
|
||||
'province_id',
|
||||
'province_fa',
|
||||
'city_id',
|
||||
'city_fa',
|
||||
'start_way_id',
|
||||
'end_way_id',
|
||||
];
|
||||
|
||||
|
||||
public function user()
|
||||
{
|
||||
return $this->belongsTo('App\Models\User');
|
||||
}
|
||||
|
||||
public function roadPatrolSubProjects()
|
||||
{
|
||||
return $this->hasMany('App\Models\RoadPatrolSubProject');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user