Hello
Can this be used for Lumen with smal changes? I get an error
Call to undefined function Spatie\Activitylog\config_path()
Thx in advance
I don't use Lumen myself, so I don't know for sure.
But I guess this package can be used if you write your own Lumen compatible service provider.
It works well with lumen 5.4.*, the only problem I've met is
Unresolvable dependency resolving [Parameter #0 [ <required> $app ]] in class Illuminate\\Auth\\AuthManager which is caused by https://github.com/spatie/laravel-activitylog/blob/master/src/ActivityLogger.php#L33 and can be solve by adding
$app->singleton(Illuminate\Auth\AuthManager::class, function ($app) {
return $app->make('auth');
});
to bootstrap/app.php.
The solution was comes from https://github.com/tymondesigns/jwt-auth/issues/561
Hi @xcaptain , Can you give me instruction, how can i integrate this package on lumen please? it will be helpful. Thanks in advance.
How about a special lumen section or splitted readme how to adjust/use it with lumen?
hi @Gummibeer , it will be good if you provide an special section for lumen. Thanks
@omar-faruk-sust sorry for being late, can you paste your problems, in my case this package works well with lumen, below are my config steps.
$app->register(Spatie\Activitylog\ActivitylogServiceProvider::class);cp vendor/spatie/laravel-activitylog/config/activitylog.php config/$app->configure('activitylog');if (! function_exists('config_path')) {
function config_path($path = '')
{
return app()->basePath() . '/config' . ($path ? '/' . $path : $path);
}
}
I'm using lumen 5.5.2 and activitylog 2.5.1
Thanks!
Most helpful comment
It works well with lumen 5.4.*, the only problem I've met is
Unresolvable dependency resolving [Parameter #0 [ <required> $app ]] in class Illuminate\\Auth\\AuthManagerwhich is caused by https://github.com/spatie/laravel-activitylog/blob/master/src/ActivityLogger.php#L33 and can be solve by addingto bootstrap/app.php.
The solution was comes from https://github.com/tymondesigns/jwt-auth/issues/561