register for sessions. photos with different settings, settings configurable
This commit is contained in:
1 parent
5fd29ef5f3
commit
17c1c2a521
14 files changed
+515
-71
No files matched your search
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\HasMany;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
|
||||
class PhotoSession extends Model
|
||||
{
|
||||
protected $fillable = ['original_image_path', 'selected_job_id'];
|
||||
|
||||
public function jobs(): HasMany
|
||||
{
|
||||
return $this->hasMany(PhotoJob::class)->with('setting')->orderBy('photo_setting_id');
|
||||
}
|
||||
|
||||
public function selectedJob(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(PhotoJob::class, 'selected_job_id');
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user