Summer Sale! All accounts are 50% off this week.

murtaza1904's avatar

PHP Error: Undefined constant "Spatie" in Psy Shell code on line 1

I am using tinker and when I am fetching the data it gives error

Spatie/Permission/Models/Role::with('permissions')->get()
0 likes
1 reply
Sinnbeck's avatar
Sinnbeck
Best Answer
Level 102

Slashes are the wrong way and there must be one before it

\Spatie\Permission\Models\Role::with('permissions')->get()
1 like

Please or to participate in this conversation.