retrieveByCredentials
.\DB::query()
->from((new Name())->getTable(), 't')
->where('created_at', '=', function ($q) {
$q
->from((new Name())->getTable(), 't2')
->selectRaw('MAX(t2.created_at)')
->whereRaw('t2.name = t.name')
->whereRaw('t2.marker = t.marker');
})
->get();