TappNetwork / filament-authentication-log

32 stars 14 forks source link

Can I override AuthenticationLogResource ? #3

Closed anthoz69 closed 3 weeks ago

anthoz69 commented 11 months ago

I create my own AuthenticationLogResource and extends Tapp\FilamentAuthenticationLog\Resources\AuthenticationLogResource I need to override getEloquentQuery on resource but not work. how I can custom query AuthenticationLogResource ? Please help.

thank you.

quasiperfect commented 11 months ago

yes @anthoz69 you can just create a AuthenticationLogResource.php file in app\Filament\Resources\AuthenticationLogResource.php

namespace App\Filament\Resources;
use Tapp\FilamentAuthenticationLog\RelationManagers\AuthenticationLogsRelationManager;

class AuthenticationLogResource extends \Tapp\FilamentAuthenticationLog\Resources\AuthenticationLogResource
{
}

and in the config file


<?php

use App\Filament\Resources\AuthenticationLogResource;

return [

    'resources' => [
        //'AutenticationLogResource' => \Tapp\FilamentAuthenticationLog\Resources\AuthenticationLogResource::class,
        'AutenticationLogResource' => AuthenticationLogResource::class,
    ],
andreia commented 11 months ago

Hi @anthoz69 @quasiperfect

Yeah, you can :)

Please check the answer here: https://github.com/TappNetwork/filament-authentication-log/issues/6#issuecomment-1714629724