Skip to content

Closure route causes php artisan:optimize to fail #1

Description

@ghobaty

Since a closure is being used for the route:

phpinfo/routes/web.php

Lines 8 to 15 in 258c388

Route::get($path, function (Content $content, PHPInfo $info) {
$info = $info->toCollection();
return $content
->header('PHP\'s configuration')
->description(' ')
->body(view('laravel-admin-phpinfo::phpinfo', compact('info')));
});

Running php artisan optimize fails with an error message

LogicException : Unable to prepare route [admin/phpinfo] for serialization. Uses Closure.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions