Code Monkey home page Code Monkey logo

expressive-slim-router's Introduction

Hi there ๐Ÿ‘‹

My name is Alejandro. I'm a Full-stack engineer, based in Zaragoza (Spain) and currently working for @hypothesis as a Senior Frontend Developer.

I love to create and contribute to OSS, and in the past few years I have created several projects, mostly related with web technologies.

Currently I'm mainly focused on Shlink, a self-hosted URL shortener.

I also have a blog where I write about software in general, take a look.

You can also follow me in my other social networks:

Mastodon Bluesky Twitter LinkedIn

expressive-slim-router's People

Contributors

acelaya avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

enduser ozzpy

expressive-slim-router's Issues

setOptions method does not work

Hello,

I try to use expressive-slim-router in my expressive v2 application.

I create a modular expressive application with zend-service-manager, plates-renderer and whoops.

I add this dependencies in my composer.json and i update dependencies.

"require" : {
    "php" : "^5.6 || ^7.0",
    "roave/security-advisories" : "dev-master",
    "zendframework/zend-component-installer" : "^1.0 || ^0.7.0",
    "zendframework/zend-config-aggregator" : "^0.2.0",
    "zendframework/zend-expressive" : "^2.0.2",
    "zendframework/zend-expressive-helpers" : "^4.0",
    "zendframework/zend-stdlib" : "^3.1",
    "zendframework/zend-servicemanager" : "^3.3",
    "zendframework/zend-expressive-platesrenderer" : "^1.3",
    "acelaya/expressive-slim-router" : "v3.0.0"
  },

And i change my config/autoload/router.global.php :

return [
    'dependencies' => [
        'factories' => [
            RouterInterface::class => Acelaya\Expressive\Factory\SlimRouterFactory::class,
        ],
    ],
];

Then i modify config/routes.php like this :

$app->get('/', App\Action\HomePageAction::class, 'home')
->setOptions([
    'defaults' => [
        'test' => 'test', 
    ]]);
$app->get('/api/ping', App\Action\PingAction::class, 'api.ping');

Finally when I var_dump Routes I can not see options...

Have you an idea to help me?

Thanks in advance

I can't use the slim router in my expressive application

Hy,

I created an expressive application with the following choices: PlatesRenderer, FastRouter, ServiceManager

I added this line in my composer.json file

require "acelaya/expressive-slim-router" : "^4.0.0"

I added this line in my routes.php file

$app->get('(/:lang)/', [
        HomeHandler::class
], 'home');

$app->route('(/:lang)/contact-me/', [
        ContactHandler::class,
], ['GET'], 'contact-me');

Only when I try the following url:
'https://www.mywebsite.com/' and '' https://www.mywebsite.com/contact-me/'

I always get my homepage.

I do not understand what I forgot to do or where the error came from.
Would you have a search track please?

thank you in advance

Shishi

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.