Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Route::resource create method broken [5.5.4 - 5.5.7] #21258

Closed
Hell4Ge opened this issue Sep 19, 2017 · 7 comments
Closed

Route::resource create method broken [5.5.4 - 5.5.7] #21258

Hell4Ge opened this issue Sep 19, 2017 · 7 comments

Comments

@Hell4Ge
Copy link

Hell4Ge commented Sep 19, 2017

  • Laravel Version: 5.5.7
  • PHP Version: 7.1
  • Database Driver & Version: pgsql

Description:

Just updated form 5.5.4 to 5.5.7 and my resource controller which was working fine started to access the show() method instead of create() method

Rolling back to 5.5.4 solves the route problem.

Steps To Reproduce:

Create a 5.5.4 project and update it with composer to 5.5.7

@edbizarro
Copy link

edbizarro commented Sep 19, 2017

+1, have the same problem with Route::get(), Route::post() etc after upgrade to 5.5.7

@gtapps
Copy link

gtapps commented Sep 20, 2017

I also updated from 5.5.4 to 5.5.7 and I'm getting Class redirector does not exist. I have multiple broken URLS,, after rolling back everything works fine.

@amdad121
Copy link
Contributor

I also have the same problem!

@damiani
Copy link
Contributor

damiani commented Sep 20, 2017

There's a fix to Illuminate/Routing/RouteCollection.php (#21261) related to fallback routes that I suspect will fix all these issues as soon as its released.

@themsaid
Copy link
Member

fixed in #21261

@xiaalngf
Copy link

xiaalngf commented Sep 20, 2017

修改 vendor\laravel\framework\src\Illuminate\Routing\RouteCollection.php文件
protected function matchAgainstRoutes(array $routes, $request, $includingMethod = true)
{
return collect($routes)->sortBy('isFallback')->first(function ($value) use ($request, $includingMethod) {
return $value->matches($request, $includingMethod);
});
}
修改为
protected function matchAgainstRoutes(array $routes, $request, $includingMethod = true)
{
return Arr::first($routes, function ($value) use ($request, $includingMethod) {
return $value->matches($request, $includingMethod);
});
}
这样可以修复

@marianomd
Copy link

I have this problem on version 6.11

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants