DashboardsTest updated and Widget factory added.

This commit is contained in:
Enes Sacid Buker
2021-06-21 19:03:08 +03:00
parent a0a776350c
commit c0df9c930e
3 changed files with 133 additions and 9 deletions

View File

@ -4,10 +4,11 @@ namespace App\Models\Common;
use App\Abstracts\Model;
use Bkwld\Cloner\Cloneable;
use Illuminate\Database\Eloquent\Factories\HasFactory;
class Widget extends Model
{
use Cloneable;
use Cloneable, HasFactory;
protected $table = 'widgets';
@ -36,4 +37,14 @@ class Widget extends Model
{
return $this->hasManyThrough('App\Models\Auth\User', 'App\Models\Common\Dashboard');
}
/**
* Create a new factory instance for the model.
*
* @return \Illuminate\Database\Eloquent\Factories\Factory
*/
protected static function newFactory()
{
return \Database\Factories\Widget::new();
}
}