I want know how to use VentureCraft/revisionable in CRUD application and get a history
Ex : users every day need to add mileage and edit mileage ...... in my view (revision.blade.php) i want get history who has add and edit i tried but i don't know how to go next step ?
This is Model
class Mileage extends Model
{
use \Venturecraft\Revisionable\RevisionableTrait;
protected $guarded = [];
}
This is Route
Route::get('/history', function () {
$mileage = \App\Mileage::all();
$history = $mileage->revisionHistory;
return view('revision',compact('history'));
});
i don't know what code to use for view ????
mileage has user_id, date,mileage i want show like this
Ex : user ...A... has add mileage for .....date.... value is ...mileage...
if they edit i want show like this user ...A... has update mileage for .....date.... value is ...mileage... to ...mileage... how can i do this ?