1

I am learning about Laravel facades in Laravel version 5.2, and I made my own facade to use in multiple custom classes of my own, so I don't have repeating code. However I've been getting the following problem.

I've referenced the Facade Alias under the namespace in my class like this: use FacadeAlias, however when I use this in two classes It gives me the following error:

Cannot use FacadeAlias as FacadeAlias because name is already in use

Can someone explain why this is happening and how to avoid it?

Nikhil Vaghela
  • 2,088
  • 2
  • 15
  • 30
  • Try to use Fully-Qualified Classname like `\App\MyFacadeClass\FacadeAlias`. Make sure you've read the Laravel Facades documentation: https://laravel.com/docs/5.2/facades – iSS Oct 13 '16 at 10:24

0 Answers0