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

}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions