we need to fix the controller b/c Redirect is not working
clicking delete gives:
"message": "Class redirect does not exist",
"exception": "ReflectionException",
cheers max
I've just tried with a fresh install of Lumen 5.3, and it works. Did you missed this step?
Enable facades by uncommenting this line in bootstrap/app.php:
$app->withFacades();
yeah i do have facades activated....weird...i am getting this error
this error occurred while deleting a log file
@mstaack Since version 5.2, Lumen uses a different Redirector class (other than Illuminate's) and no longer offers a container alias for the Redirector class or the Redirect Facade out of the box. So you should do them yourself.
In your bootstrap/app.php
, add the following code
$app->withFacades(true, [
'Illuminate\Support\Facades\Redirect' => 'Redirect'
]);
$app->bind('redirect', 'Laravel\Lumen\Http\Redirector');
@rap2hpoutre In the LogViewerController
, you may want to consider using redirect()
helper function instead of the Redirect
facade since the it will have the same behaviour in both Laravel and Lumen without extra configuration.
@elghobaty Thank for your analysis and the workaround! redirect()
helper does not seem to exist in Laravel 4.2 and this package is still compatible (I hope) with Laravel 4.2, that's why I don't want to change it. Maybe we should use redirect()
if it exists and Redirect
façade if not? Feel free to submit a PR if you think it's OK and I will merge it.
Fixed in v0.7.1 (thanks to @elghobaty)
Most helpful comment
@mstaack Since version 5.2, Lumen uses a different Redirector class (other than Illuminate's) and no longer offers a container alias for the Redirector class or the Redirect Facade out of the box. So you should do them yourself.
In your
bootstrap/app.php
, add the following code@rap2hpoutre In the
LogViewerController
, you may want to consider usingredirect()
helper function instead of theRedirect
facade since the it will have the same behaviour in both Laravel and Lumen without extra configuration.