owen-it / laravel-auditing

Record the change log from models in Laravel
https://laravel-auditing.com
MIT License
3.07k stars 389 forks source link

'OwenIt\Auditing\Contracts\Audit' does not have a method 'create' #485

Closed fiermarin closed 2 years ago

fiermarin commented 5 years ago
Q A
Bug? yes
New Feature? no
Framework Laravel
Framework version 5.7.*
Package version 8.0
PHP version 7.1.3

Actual Behaviour

The following behavior only occurs in production (host). In the development environment (ide cloud 9) the entire audit works correctly.

When I try to add, update or insert a new company to my database, the error that I mention below is shown. I clarify that the record is inserted in the company table, but nothing is inserted in the audit table.

Error

call_user_func() expects parameter 1 to be a valid callback, class 'OwenIt\Auditing\Contracts\Audit' does not have a method 'create'

array:11 [▼ "old_values" => [] "new_values" => array:5 [▼ "empresa_nombre" => "Prueba" "empresa_telefono" => "123456789" "empresa_estado" => "1" "empresa_ingreso" => "2019-02-04" "id" => 32 ] "event" => "created" "auditable_id" => 32 "auditable_type" => "App\Models\Empresa" "user_id" => 2 "user_type" => "App\User" "url" => "http://****.*********.com/empresas?" "ip_address" => "190.64.86.74" "user_agent" => "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36" "tags" => null ]

fiermarin commented 5 years ago

Up

MortenDHansen commented 2 years ago

Sorry for the missing response. Please reopen if this is still relevant!