Routes

Routes

Overview

This is a list of the most important default routes defined by Gentics Portal | php. More routes can be found in various routes.php files inside the package.

Table 1. Gentics Portal | php routes overview
Name Uri pattern Method Action

content

/{path}

any

ContentController@index

genticsimagestore.cropandresize

/{width}/{height}/cropandresize/{mode}/{topleft_x}/{topleft_y}/{cropwidth}/{cropheight}/{path}

GET

ContentController@genticsImageStore

genticsimagestore.resize

/{width}/{height}/{mode}/{path}

GET

ContentController@genticsImageStore

api.preview

/preview/{folderPath?}

POST

CmsController@index

health.live

/api/health/live

GET

Closure

health.ready

/api/health/ready

GET

Closure

Priority

The route files are loaded in the following order:

  1. Routes from your application (routes/*)

  2. Routes from Gentics Portal | php package

The first route that is defined wins. The routing table can be displayed with php artisan route:list.

There is one exception though:

If a route is added with the exact same URI pattern that already exists or a wider wildcard added later, the old route will be replaced by the new route. However Gentics Portal | php uses priorization on routes, and will therefore not overwrite routes already defined by your application. That means you can "overwrite" any routes that are defined by Gentics Portal | php.

If you need custom priorities, you can use the ->priority(50) method on your routes (default value is 50). The higher one is the winner.

Laravel documentation