spatie / activitylog

A very simple activity logger to monitor the users of your website or application
https://spatie.be/opensource/laravel
MIT License
582 stars 75 forks source link

Laravel 5.2 #23

Closed XavRsl closed 8 years ago

XavRsl commented 8 years ago

Hi, The path to Guard changed in Laravel 5.2 from Illuminate\Auth\Guard;to Illuminate\Contracts\Auth\Guard;. This will need to be updated in ActivitylogSupervisor.php

Thanks,

Xavier

arcanedev-maroc commented 8 years ago

Hi @XavRsl,

This change means that you're going to use an abstract class than a concrete one.

XavRsl commented 8 years ago

The change is to be made in the package if you don't want an error to be thrown. I just saw that after updating to 5.2.

arcanedev-maroc commented 8 years ago

It's a good change, because its decouple the code from the dependency and we can extend the Guard with a custom one.

XavRsl commented 8 years ago

Yep !

Le jeu. 24 déc. 2015 à 16:53, ARCANEDEV notifications@github.com a écrit :

It's a good change, because its decouple the code from the dependency and we can extend the Guard with a custom one.

— Reply to this email directly or view it on GitHub https://github.com/spatie/activitylog/issues/23#issuecomment-167130036.

ozgurkaragoz commented 8 years ago

Hi,

Guard problem fixed for laravel 5.2

https://github.com/spatie/activitylog/pull/24

pbernim commented 8 years ago

Hi,

I have this problem:

FatalErrorException in Model.php line 852: Class name must be a valid object or a string

The problem is at the model, relationship:

return $this->belongsTo(Config::get('auth.model'), 'user_id');

Thanks!

pbernim commented 8 years ago

I found the solution:

in 'public function user()' change:

return $this->belongsTo(Config::get('auth.model'), 'user_id');

    return $this->belongsTo(Config::get('auth.providers.users.model'), 'user_id');
freekmurze commented 8 years ago

Version 2.3.0 of the package is compatible with L5.2 Thanks for your help!