laravel-grapes icon indicating copy to clipboard operation
laravel-grapes copied to clipboard

Frontend routes don't exist

Open rafa-lobo opened this issue 2 years ago • 2 comments

Hi, I have been testing the package (which is great, the simplest and most effective one I've browsed so far), but I can't seem to be able to load the frontend pages. I am able to create the pages, save them to the DB, and everything else, but when I access the desired route it returns 404.

My config file is:

return [
    // routes configurations
    'builder_prefix' => 'builder', // prefix for builder

    'middleware' => null, // middleware for builder

    'frontend_prefix' => '', // prefix for frontend

    /* Define additional translation languages. */
    'languages' => ['pt'],

];

I have created a page with slug build-test: image

But when I enter the page I get 404 (no routes registered as well): http://localhost/build-test

Am I missing something here? Should I manually create the controllers? Nothing mentions this in the docs.

rafa-lobo avatar Aug 02 '23 04:08 rafa-lobo

It seems that the FrontendController is empty so it is not rendering anything I can get it working by manually create a controller and a view to display di html output

anditriana avatar Aug 25 '23 04:08 anditriana

@anditriana That is great. Can you share an example of the controller which works for you please?

core45 avatar May 18 '24 17:05 core45