Skip to content

How to properly use the childTypes variable for authenticated routes #116

@mikeslinkman

Description

@mikeslinkman

Love the idea of the package but I'm running into some issues with properly defining the $childTypes. I've added a char value type for my user where each char refers to a different child so I setup my $childtypes like below:

protected array $childTypes = [
        'A' => Admin::class,
        'U' => SearchUser::class,
        'C' => CompanyUser::class,
];

But now when I try to visit a page where the authenticated user is used e.g. $user = auth()->user() I'm getting the error Class "A" not found or whatever other value is set in the type column.

Any help is greatly appreciated

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