Skip to content

All models discovered if one of them included in boot function of AppServiceProvider #847

Description

@bimix

I found out that including only one model in the boot method it discovers all other models and their relations. That is a strange behaviour that should be checked.

public function boot(): void
{
    Sanctum::usePersonalAccessTokenModel(PersonalAccessToken::class);
    // \Lodata::discover(\App\Models\Customer::class);
    // \Lodata::discover(\App\Models\ProductType::class);
     \Lodata::discover(\App\Models\Status::class); -->> I only want this discovered

    dd(\Lodata::getResources()); -->> this prints out all models + relations

}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions