File: /var/www/vhost/disk-apps/qas.sports-crowd.com/app/Models/Experience/ExperiencePlan.php
<?php
namespace App\Models\Experience;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
class ExperiencePlan extends Model
{
use SoftDeletes;
protected $dates = ['deleted_at'];
protected $fillable = [
'id',
'name',
'description',
'type',
'experience_id',
'total_capacity',
'available_slots',
'entries_per_purchase',
'display_index',
'buy_limit',
];
public function experience()
{
return $this->belongsTo(Experience::class);
}
public function prices()
{
return $this->hasMany(ExperiencePlanPrice::class)
->select('id', 'price', 'description', 'experience_plan_id')
->orderBy('price', 'asc');
}
}