- Complete GGZ Ecademy Laravel backend application - RESTful API for learning products, members, filters - Authentication and authorization system - Database migrations and seeders - Custom CRUD generator commands - Email notification system - Integration with frontend applications
This commit is contained in:
32
app/Repositories/Version.php
Normal file
32
app/Repositories/Version.php
Normal file
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
namespace App\Repositories;
|
||||
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class Version extends Model
|
||||
{
|
||||
use SoftDeletes;
|
||||
|
||||
protected $dates = ['deleted_at'];
|
||||
|
||||
protected $guarded = ['id'];
|
||||
|
||||
protected $with = ['filters', 'checklists'];
|
||||
|
||||
public function learning_product()
|
||||
{
|
||||
return $this->belongsTo(LearningProduct::class);
|
||||
}
|
||||
|
||||
public function filters()
|
||||
{
|
||||
return $this->morphMany(FilterItemsAssociation::class, 'filter_items_associations');
|
||||
}
|
||||
|
||||
public function checklists()
|
||||
{
|
||||
return $this->hasMany(ChecklistVersion::class);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user