1. Go to this page and download the library: Download seinoxygen/audit-viewer library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
namespace App\Http\Controllers;
use App\Models\Blog;
use Illuminate\Http\Request;
use Illuminate\Routing\Controller;
use SeinOxygen\AuditViewer\Contracts\AuditViewContract;
use SeinOxygen\AuditViewer\Http\Traits\HasAudits;
class BlogController extends Controller implements AuditViewContract
{
use HasAudits;
public function setModel()
{
return Blog::class;
}
}
use App\Http\Controllers\BlogController;
use Illuminate\Support\Facades\Route;
Route::get('/blog/{model}/audit', [BlogController::class, 'audit']);