Skip to content

Commit

Permalink
up
Browse files Browse the repository at this point in the history
  • Loading branch information
marco76tv committed Sep 20, 2024
1 parent 0926529 commit fbd7ecf
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions Models/BaseModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ abstract class BaseModel extends Model

/** @var string */
protected $connection = 'job';
protected $prefix = '_';

/** @var list<string> */
protected $fillable = ['id'];
Expand All @@ -55,6 +56,15 @@ abstract class BaseModel extends Model
// 'password'
];

public function __construct(array $attributes = [])
{
if (isset($this->prefix)) {
$this->table = $this->prefix.$this->table;
}

parent::__construct($attributes);
}

/**
* ----
* Create a new factory instance for the model.
Expand Down

0 comments on commit fbd7ecf

Please sign in to comment.