git add .

git commit  "add tours pages, components and show views"
This commit is contained in:
2026-08-17 11:36:19 +03:30
parent e99c340f1e
commit 970786ae94
15 changed files with 595 additions and 249 deletions
+2 -2
View File
@@ -14,7 +14,7 @@ use Illuminate\Database\Eloquent\Model;
* Class City
*
* @property int $id
* @property int $provinces
* @property int $province_id
* @property string $name
* @property Carbon $created_at
* @property Carbon $updated_at
@@ -33,7 +33,7 @@ class City extends Model
];
protected $fillable = [
'provinces',
'province_id',
'name'
];
+1 -1
View File
@@ -34,7 +34,7 @@ class Province extends Model
}
public function cities()
{
return $this->hasMany(City::class);
return $this->belongsTo(City::class);
}
}
+7 -3
View File
@@ -12,7 +12,7 @@ use Illuminate\Database\Eloquent\Model;
/**
* Class Tour
*
*
* @property int $id
* @property string $title
* @property string $summary
@@ -24,7 +24,7 @@ use Illuminate\Database\Eloquent\Model;
* @property int $status
* @property Carbon $created_at
* @property Carbon $updated_at
*
*
* @property Collection|Comment[] $comments
*
* @package App\Models
@@ -56,4 +56,8 @@ class Tour extends Model
{
return $this->hasMany(Comment::class);
}
}
public function travelType()
{
return $this->belongsTo(TravelType::class);
}
}
+6 -2
View File
@@ -11,7 +11,7 @@ use Illuminate\Database\Eloquent\Model;
/**
* Class TravelType
*
*
* @property int $id
* @property string $name
* @property int $status
@@ -33,4 +33,8 @@ class TravelType extends Model
'name',
'status'
];
}
public function tours()
{
return $this->hasMany(Tour::class, 'travel_type_id');
}
}