Reputation: 1104
I have this class in a workbench package:
class SomeClass{
//Constructor
function __construct(){
$isAuth = Auth::check();
}
But it gives me following error:
Class 'vendor\pachage\Auth' not found
Is this a namespace issue? I am using the following namespace:
namespace vendor\pachage;
Upvotes: 0
Views: 62
Reputation: 4430
You need Fully qualified name, add a backslash:
\Auth::check()
;
It all described as Namepace resolution.
Upvotes: 1