If I write this line on routes/web.php file
dd( app()['config']["auth.guards.web"] );
It outputs this:
array:2 [▼
"driver" => "session"
"provider" => "users"
]
That's cool, but my question is since app()['config'] returns an object so how this ["auth.guards.web"]works? Even there is no index with that name!
Outside of Laravel I tried to write a class named Test so that it returns the same output but I got an error! Which is,
Fatal error: Uncaught Error: Cannot use object of type Test as array
Can anyone explain it with core php?
app()['config']probably implementsArrayAccess