feat:implement tour models and controllers and blade

This commit is contained in:
2026-08-17 13:12:08 +03:30
parent c2fba2000c
commit 277f9759a0
3 changed files with 83 additions and 4 deletions
+12 -4
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 File $file
* @property Collection|Comment[] $comments
* @property Collection|Favorite[] $favorites
@@ -35,12 +35,17 @@ use Illuminate\Database\Eloquent\Model;
class Tour extends Model
{
protected $table = 'tours';
public $timestamps = false;
public static $snakeAttributes = false;
protected $casts = [
'file_id' => 'int',
'duration' => 'int',
'status' => 'int'
'price' => 'int',
'status' => 'int',
'created_at' => 'datetime',
'views' => 'int',
];
protected $fillable = [
@@ -51,7 +56,10 @@ class Tour extends Model
'origin',
'destination',
'duration',
'status'
'price',
'views',
'status',
'created_at'
];
public function file()