Skip to content

Component Target class does not exist error #2

Description

@convers39

Hi!

Thanks for the tutorial!

I have some issues with the usage of components and wonder if could get help.

I deleted the component file in App\View\Components but now get a 'Target class does not exist' error

It seems like it still attempts to look for the class deleted. If I change the component name to the corresponding model name, e.g. model Post -> component post.blade.php in this tutorial, it did work. (I have a Course model but like to create a course-card.blade.php component instead of course.blade.php.)

The questions is, what if I like to make multiple different components but do not really care about the model? For example, I may like to create 'post-sm', 'post-md', 'post-lg' for different usage? Or maybe that is not the purpose of using a component?

image

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