Correctly handle error; don't overwrite laravel method
This commit is contained in:
parent
32fb21d0b7
commit
f558bc880a
3 changed files with 4 additions and 3 deletions
|
@ -101,7 +101,7 @@ class AuditLog extends Model
|
|||
*
|
||||
* @return $this
|
||||
*/
|
||||
public static function factory(string $action, array $metadata, bool $isSystem = false)
|
||||
public static function instance(string $action, array $metadata, bool $isSystem = false)
|
||||
{
|
||||
/** @var \Illuminate\Http\Request $request */
|
||||
$request = Container::getInstance()->make('request');
|
||||
|
|
|
@ -336,7 +336,7 @@ class Server extends Model
|
|||
*/
|
||||
public function newAuditEvent(string $action, array $metadata = []): AuditLog
|
||||
{
|
||||
return AuditLog::factory($action, $metadata)->fill([
|
||||
return AuditLog::instance($action, $metadata)->fill([
|
||||
'server_id' => $this->id,
|
||||
]);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue