Can laravel 5.5 horizon use controller method instead of closure?

Posted 1 year ago by skeith22

I'm having problems handling the Horizon::auth() method in the routes. Can the method use a controller to handle the response?

the current code shows an error when you return false, but when you return true it's normal, it shows the horizon dashboard.

current code

Horizon::auth(function ($request) {
    if (TRUE) {
        return true;

    return false;

Please sign in or create an account to participate in this conversation.

Laracasts Mascot

Hi, Have We Met Yet?

Did you know that, in addition to the forum, Laracasts includes well over 1000 lessons on modern web development? All for the price of one lunch out per month.

Sign Me Up


Reply to

Use Markdown with GitHub-flavored code blocks.