Skip to content

how to pass the namespace path to a controller #363

Description

@voocel

how to pass the namespace path to a controller and action
like this
Macaw::get('/home', 'HomeController@home');

Activity

  1. r7zq commented on Oct 19, 2017

    @r7zq

    like this?
    $klein->respond('GET', '/index', array('Hozzaq\Controller\IndexController', 'index'));

  2. njxqlus commented on Nov 15, 2017

    @njxqlus

    You can use it like this (for non static methods):
    $klein->get('/tests', [new \App\Controllers\TestController(), 'index']);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions