This is my model, I want to log table user_group and role_group. Example: Assign a role to group or assign a user to group.
How do you do?
Thanks
Vinh
`
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use \OwenIt\Auditing\Auditing;
class Group extends Auditing
{
// use Auditing;
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = array('name', 'description');
/**
* Get all of the users for the group.
*/
public function users()
{
return $this->belongsToMany(\App\User::class, 'user_group');
}
/**
* Get all of the roles for the group.
*/
public function roles()
{
return $this->belongsToMany(Role::class, 'role_group');
}
}
`
Hi @tonvinh ,
I did not forget this improvements will soon be available.
I am looking forward to this feature as well. It is something I really would like to see available, as none of the other solutions for history/auditing have it available.
I have not had much time, but whenever possible I have thought of something.
This feature depends largely on the framework.
Most helpful comment
https://github.com/owen-it/laravel-auditing/issues/58