I'm building a basic plugin that serves dynamic pages from the database.
I've made a component from which I want to return the theme's included 404 page (/404.htm) in case the dynamic page doesn't exist.
It's possible to return a \Illuminate\Http\Response from the onRun() method, but I have no idea how to return a different CMS page.
Example code from the component:
public function onRun()
{
return \Response::make('Page not found', 404);
return \Redirect::to('404'); // this works but a 404 should never be a redirect!
}
But this isn't what I need ofcourse. Is there an easy way to do this? (I realize October CMS is still in its infancy, so I'd totally accept any "hacky" workarounds)
Last updated