AsgardCms/Dashboard

View on GitHub
Entities/Widget.php

Summary

Maintainability
A
0 mins
Test Coverage
<?php namespace Modules\Dashboard\Entities;

use Illuminate\Database\Eloquent\Model;

class Widget extends Model
{
    protected $fillable = ['widgets', 'user_id'];
    protected $table = 'dashboard__widgets';

    public function user()
    {
        $driver = config('asgard.user.users.driver');

        return $this->belongsTo("Modules\\User\\Entities\\{$driver}\\User");
    }
}