Repository URL to install this package:
|
Version:
0.2.0 ▾
|
<?php namespace Modules\Courses\Entities;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
use Prettus\Repository\Contracts\Presentable;
use Prettus\Repository\Traits\PresentableTrait;
/**
* Modules\Courses\Entities\Slide
*
* @property integer $id
* @property string $title
* @property string $slide_photo
* @property integer $order
* @property boolean $is_active
* @property integer $course_id
* @property \Carbon\Carbon $created_at
* @property \Carbon\Carbon $updated_at
* @property string $deleted_at
* @property-read \Modules\Courses\Entities\Course $course
*/
class Slide extends Model implements Presentable {
use PresentableTrait,
SoftDeletes;
/**
* The database table used by the model.
*
* @var string
*/
protected $table = 'slides';
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = ['title', 'order', 'slide_photo', 'is_active', 'course_id'];
/**
* Get the post that owns the comment.
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
*/
public function course()
{
return $this->belongsTo('Modules\Courses\Entities\Course');
}
/**
*
* @return \Illuminate\Database\Eloquent\Relations\HasMany
*/
public function analytic()
{
return $this->hasMany('Modules\Courses\Entities\Analytic', 'slide_id');
}
}