johnny5 - 1 week ago

Hi, I'm having a play with PyroCms 3.5. Apart from purchasing the Api plugin, what's the best way to create a single Api endpoint that returns Json? I'd like to create a self contained Vue component within my theme. Secondly, how do I override the posts table builder? If I edit the file directly within the core folder I can remove a column. This obviously isn't the way you intend though :) Thanks!

william - 1 week ago

You can simply create a new route using a custom controller you create to return whatever data you wish as json. It works exactly the same as Laravel if you are familiar with it. You could add your own routes file, or as preferred (i think) in your service provider (for example the one for your theme):

     * The addon routes.
     * @type array|null
    protected $routes = [];