Whenever you put your class in a namespace, any other class that you reference in that class assumes that it is also in that same namespace unless you tell it otherwise.
So, since you set your namespace to
Arg\Tagcloud when you directly reference
Request::url(), PHP thinks that you're telling it to use the
Request class inside the
There's two solutions to this:
\ in front of
Request to tell PHP to use the global namespace, not the
use the class.
use Request to the top of your class (under your namespace), this will let PHP know that you want to use this class, but it doesn't belong in the current namespace.
<?php namespace Arg\Tagcloud; use Request;