User Log is a small package, that can help you to stored log of created, updated and approved user and also store auth user company.
This is a small package to easy and simplify your code.
composer require skycoder/user-logphp artisan vendor:publish press the number which hold user-log
You should use use UserLog; trait to your model which contain use Skycoder\UserLog\UserLog; namespace
And also use @include('user-log::user-logs', ['data' => $item]) to your table where you display your data. here $item is your model data.
<?php namespace App\Models; use Illuminate\Database\Eloquent\Model; use Skycoder\UserLog\UserLog; class ModelName extends Model { use UserLog; }<table class="table"> <thead> <tr> <th>Name</th> <th>Mobile</th> <th>Email</th> <th>Action</th> </tr> </thead> <tbody> @foreach ($items as $item) <tr> <td>{{ $item->name }}</td> <td>{{ $item->mobile }}</td> <td>{{ $item->email }}</td> <td> @include('user-log::user-logs', ['data' => $item]) </td> </tr> @endforeach </tbody> </table>