Closed fdalex closed 4 months ago
The ::class
is a constant where the value is the fully qualified class name. Previous versions of Laravel used the class name as a string in config and other files. Using the constant is the preferred method, however, because IDEs and other tools can correctly resolve and understand the constant, unlike the string value.
Many packages, including this one, were initially developed when the Laravel config used the string version so that's what was documented. Any time you see the use class name as quoted string, you should be able to use the ::class
constant instead. Unless it's in a actual string context of course. :)
In your case:
Subfission\Cas\CasServiceProvider::class,
Sorry for the confusion. I'll leave this issue open as a reminder to update the documentation.
Thanks, looks like I'm on a good way now to make it work. cas()->authenticate() is generating the CAS url. (still some CORS errors but from current API auth system, working on it).
@dstepe thank you for stepping in to help these devs. I updated the wiki to include the new paradigm for Laravel. It's amazing how much Laravel has grown since version 5!
Hi, trying to follow your wiki but I find examples are kinda stranges, like,
Shouldnt it be Subfission\Cas\CasServiceProvider::class instead like others providers ? I'm confused. (I'm new to laravel, started to learn with version 9, now coding with laravel 10).
Same for Kernel Any help ? :)