GrafiteInc / CMS

Decoupled CMS for any Laravel app, gain control of: pages, blogs, galleries, events, images, custom modules and more.
https://cms.grafite.ca
MIT License
495 stars 104 forks source link

Where do the published pages go? #164

Closed tech911Admin closed 6 years ago

tech911Admin commented 6 years ago

Sorry for another stupid question, I entered a url of 'test-page' for my first page but it does not show up at /test-page.

Have you guys published a wiki or any docs for this other than the basic install?

Thanks -

tech911Admin commented 6 years ago

It appears the published pages go to /page/test-page

.... but when I go there I receive this error -

But when I go there, there is no pages controller set up:

Class Cms\PagesController does not exist

I see the pages controller installed in the controllers\cms directory, but for some reason routes have not been set up for it correctly. I don't want to keep jury rigging this thing. I might have missed a step during install. Can someone please tell me what I missed.

mlantz commented 6 years ago

You will need to confirm that in your RouteServiceProvider.php your mapWebRoutes method looks similar to:

Route::middleware('web')
    ->namespace($this->namespace)
    ->group(function () {
        require base_path('routes/web.php');
        require base_path('routes/cms.php');
    });

In order to get wildcard urls to work correctly you have to add a special route to to the CMS routes file, as mentioned in the docs.