Skip to main content Skip to navigation

Components: HasImage

How to use

Components that use this trait allow you to pass in an image to render.

Component::make()
    ->image(public_path('users/avatar.jpg'));

Available methods

image(?string $image): static

Set the image URL. Must be publicly accessible.

Component::make()
    ->image(public_path('users/avatar.jpg'));