# app/avo/resources/course_link.rb
class Avo::Resources::CourseLink < Avo::BaseResource
  self.title = :link
  self.model_class = ::Course::Link

  def fields
    field :id, as: :id
    field :link,
      as: :text,
      components: {
        show_component: PhlexComponent
      }
    field :course, as: :belongs_to, searchable: true
  end
end
```

<Image src="/assets/img/guides/phlex/phlex_component.png" width="1278" height="335" alt="Phlex component" />

:::tip
While this example uses a field, the same pattern applies to resources. You can use the `components` option to customize the component for the `index`, `show`, `edit`, and `new` views.
:::

## Conclusion

Even though Avo relies on [ViewComponent](https://viewcomponent.org/) under the hood, you're free to use [Phlex](https://www.phlex.fun/) components in your Avo views.

This guide covered a basic example, but [Phlex](https://www.phlex.fun/) is capable of much more. Check out the [official Phlex documentation](https://www.phlex.fun/introduction/) to learn how to build more advanced components.

If you have questions, suggestions, or feedback, join the conversation in the [Feedback: Using Phlex Components in Avo Views](https://github.com/avo-hq/avo/discussions/3860).

---