Have you seen our video tutorials? Check 'em out!

Changing the path for posts to something else.

william - 3 weeks ago

I was just running into this, and even though it's extremely easy to fix and it's also in the documentation. I thought would post a tip about it since i am sure someone else will look for it.

Version 2.2 of anomaly/posts-module

(If you are running 2.1 as i were. Then just update your composer file and run composer update. No migration needed )

Publish the posts files

php artisan addon:publish posts

The create a routes.php file located in :

domain.dev/resources/APPLICATION_NAME/routes.php

Simply paste the following inside

<?php


Route::get('yournewpath', [
    'as'   => 'anomaly.module.posts::posts.index',
    'uses' => 'Anomaly\PostsModule\Http\Controller\[email protected]',
]);

Version 2.1 anomaly/posts-module

You simply publish the addon files with the following command:

php artisan addon:publish posts

Then you edit your path in the configuration file, located here:

DOMAIN.DEV/resources/YOURAPPNAME/addons/anomaly/posts-module/config/paths.php

Change

'module' => 'posts', // Change posts to news as an example.

Everything is well documented here: https://www.pyrocms.com/documentation/streams-platform/v1.1#services/config/overriding-configuration-files

ryanthompson - 3 weeks ago

If you opt into v2.2 for posts (will come standard in Pyro v3.2) you can simply create a routes.php here:

resources/REF/routes.php

And override the route by name:

Route::get('news', [
    'as'   => 'anomaly.module.posts::posts.index',
    'uses' => 'Anomaly\PostsModule\Http\Controller\[email protected]',
]);