It doesn't matter. When you make a new model. You have two options: add HasFactory trait or change extended class. In both of them you have to change model.
So in my opinion it's better to just add HasFactory trait.
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
If each model extends:
<?php
namespace App\Models;
...
class Order extends Model
{
Is it reasonable to just add it to the Model class?
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model as Eloquent;
class Model extends Eloquent
{
use HasFactory;
protected $guarded = [];
}
Please or to participate in this conversation.