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

Laravel 5.4 Class cors does not exist #172

Closed
christophrumpel opened this Issue Jan 25, 2017 · 10 comments

Comments

Projects
None yet
8 participants
@christophrumpel

christophrumpel commented Jan 25, 2017

Hey, since I upgraded Laravel to 5.4 the cors middleware is not found anymore. I get this error Class cors does not exist.
Using the middleware as a route parameter:

Route::group([ 'middleware' => 'cors'], function () {
...
});
@barryvdh

This comment has been minimized.

Show comment
Hide comment
@barryvdh

barryvdh Jan 25, 2017

Owner

Does #171 fix it for you?

Owner

barryvdh commented Jan 25, 2017

Does #171 fix it for you?

@christophrumpel

This comment has been minimized.

Show comment
Hide comment
@christophrumpel

christophrumpel commented Jan 25, 2017

yes it does! thx @barryvdh

@aneeskodappana

This comment has been minimized.

Show comment
Hide comment
@aneeskodappana

aneeskodappana Mar 20, 2017

how did you solve the issue @christophrumpel ?

aneeskodappana commented Mar 20, 2017

how did you solve the issue @christophrumpel ?

@christophrumpel

This comment has been minimized.

Show comment
Hide comment
@christophrumpel

christophrumpel Mar 20, 2017

Not sure but guess I just updated the version. Are you on the latest one?

christophrumpel commented Mar 20, 2017

Not sure but guess I just updated the version. Are you on the latest one?

@barryvdh

This comment has been minimized.

Show comment
Hide comment
@barryvdh

barryvdh Mar 20, 2017

Owner

Try with 0.9.0 and use the full classname, not just cors. See the updated readme.

Owner

barryvdh commented Mar 20, 2017

Try with 0.9.0 and use the full classname, not just cors. See the updated readme.

@rbrisita

This comment has been minimized.

Show comment
Hide comment
@rbrisita

rbrisita Sep 12, 2017

Adding for anyone looking for the fix:

app/Http/Kernel.php

add 'cors' => \Barryvdh\Cors\HandleCors::class, to the protected $routeMiddleware array.

rbrisita commented Sep 12, 2017

Adding for anyone looking for the fix:

app/Http/Kernel.php

add 'cors' => \Barryvdh\Cors\HandleCors::class, to the protected $routeMiddleware array.

@ismailplus

This comment has been minimized.

Show comment
Hide comment
@ismailplus

ismailplus Sep 14, 2017

thanks, @rbrisita your information do the job for me.

ismailplus commented Sep 14, 2017

thanks, @rbrisita your information do the job for me.

@besmartness

This comment has been minimized.

Show comment
Hide comment
@besmartness

besmartness Dec 3, 2017

works so beautifull!!!

besmartness commented Dec 3, 2017

works so beautifull!!!

@Walterisimo

This comment has been minimized.

Show comment
Hide comment
@Walterisimo

Walterisimo Feb 10, 2018

Thanks @rbrisita.
It worked for me I have version 5.5 of Laravel

Walterisimo commented Feb 10, 2018

Thanks @rbrisita.
It worked for me I have version 5.5 of Laravel

@Tse-ChiKit

This comment has been minimized.

Show comment
Hide comment
@Tse-ChiKit

Tse-ChiKit Mar 20, 2018

Thanks, @rbrisita that works for me for the laravel 5.4.

Tse-ChiKit commented Mar 20, 2018

Thanks, @rbrisita that works for me for the laravel 5.4.

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