You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
347 B
18 lines
347 B
<?php
|
|
|
|
namespace App\Domains\System\Queries;
|
|
|
|
use Illuminate\Database\Eloquent\Collection;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class GetModelAuditLog
|
|
{
|
|
public function get(Model $model): Collection
|
|
{
|
|
return $model->audits()
|
|
->with('user')
|
|
->latest()
|
|
->limit(5)
|
|
->get();
|
|
}
|
|
}
|
|
|