This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.

agoiabeladeyemi22898
agoiabeladeyemi22898

Hi, still learning Octobercms. I understand what component and controller are but I want to know the different between component and controller:

  1. can they be used interchangeable meaning can a controller do what a component can do
  2. If no, when will I need use controller instead instead of component,

can't just seems to know the appropriate time if usage if both, thanks

angelside
angelside

Controllers is backend controller, they responsible CRUD and list like stuff for backend. As I see components is not controller, they act like frontend widget. We put components in already exists CMS or Static page.

I can't imagine how we use controller for frontend. Only few scenario like sitemap, rss, api. We can use cutom route with route.php, but I am not try attach a controller for this route.

Last updated

1-2 of 2

You cannot edit posts or make replies: the forum has moved to talk.octobercms.com.