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

i understand how laravel works but taking a look at octobercms, i believe i understand that plugin when created can be imported and used in multiple static pages in multiple pages, but i still can not get to understand when and how someone needs to use routes.php in the plugin.

Please help me understand by giving me a use case study.

thanks

alxy
alxy

An example would be to expose an HTTP api for you frontend framework: https://github.com/scottbedard/oc-blogapi-plugin

agoiabeladeyemi22898
agoiabeladeyemi22898

@alxy, thanks so much for the swift reply. but assuming am not creating an api for my frontend end at all.

E.G assuming am doing basic Create, Read, Update and Delete with my plugin,

Now assuming i want to show a detail/particular page of a single entity in my plugin data

I.e blog/post/1

will I need to use a routes.php to handle a basic show method in my plugin

hope u understand me pls?

alxy
alxy

No, in this case you don't need the routes file. You are probably looking for components.

agoiabeladeyemi22898

1-5 of 5

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