123456789101112131415161718192021222324252627282930313233343536373839 |
- <?php
- namespace App\Repositories\Models\Course;
- use App\Repositories\Models\Model;
- use App\Repositories\Models\User\User;
- use Prettus\Repository\Contracts\Transformable;
- use Prettus\Repository\Traits\TransformableTrait;
- /**
- * Class Course.
- *
- * @package namespace App\Repositories\Models;
- */
- class UserRecord extends Model implements Transformable
- {
- use TransformableTrait;
- protected $table = 'course_user_records';
- /**
- * The attributes that are mass assignable.
- *
- * @var array
- */
- protected $guarded = [];
- public function course()
- {
- return $this->belongsTo(Course::class);
- }
- public function user()
- {
- return $this->belongsTo(User::class, 'user_id', 'id');
- }
- }
|