Skip to content

Commit

Permalink
fix:routes
Browse files Browse the repository at this point in the history
  • Loading branch information
DevSmartSolutions committed May 6, 2019
1 parent 22acc98 commit 8b166d6
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
12 changes: 8 additions & 4 deletions config/routes.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,17 @@

use Cake\Routing\Router;

Router::plugin('SmartSolutionsItaly/CakePHP/Manifest', function ($routes) {
$routes->connect('/manifest', ['controller' => 'manifest', 'action' => 'index'])
Router::plugin('SmartSolutionsItaly/CakePHP/Manifest', ['path' => '/manifest'], function ($routes) {
$routes->get('', ['controller' => 'Manifest', 'action' => 'index'])
->setExtensions(['json']);
});

$routes->connect('/ieconfig', ['controller' => 'manifest', 'action' => 'ieconfig'])
Router::plugin('SmartSolutionsItaly/CakePHP/Manifest', ['path' => '/ieconfig'], function ($routes) {
$routes->get('', ['controller' => 'Manifest', 'action' => 'ieconfig'])
->setExtensions(['xml']);
});

$routes->connect('/site', ['controller' => 'manifest', 'action' => 'chrome'])
Router::plugin('SmartSolutionsItaly/CakePHP/Manifest', ['path' => '/site'], function ($routes) {
$routes->get('', ['controller' => 'Manifest', 'action' => 'chrome'])
->setExtensions(['webmanifest']);
});
3 changes: 2 additions & 1 deletion src/Controller/ManifestController.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

namespace SmartSolutionsItaly\CakePHP\Manifest\Controller;

use Cake\Controller\Controller;
use SmartSolutionsItaly\CakePHP\Manifest\Manifest;

/**
Expand All @@ -26,7 +27,7 @@
* @author Lucio Benini <dev@smartsolutions.it>
* @since 1.0.0
*/
class ManifestController extends AppController
class ManifestController extends Controller
{
/**
* Handles the "index" action.
Expand Down

0 comments on commit 8b166d6

Please sign in to comment.