Laravel-InstantAvatar icon indicating copy to clipboard operation
Laravel-InstantAvatar copied to clipboard

Cannot use Vinicius73\IAvatar\Lib\InstantAvatar as InstantAvatar because the name is already in use

Open pixsiro opened this issue 8 years ago • 3 comments

Hi, I got this issue on Laravel 5.3. I follow step by step your installation guide but when I use the package laravel give me the error describe in title. I use the package as follows:

...
use IAvatar;
class UserController extends AppBaseController{
      ...
     public function store(Request $request) {
          ..
          $avatar = IAvatar::random('My String');
          ...
     }
     ...
}

so when I try to save the User with store method laravel give me this error: ``Cannot use Vinicius73\IAvatar\Lib\InstantAvatar as InstantAvatar because the name is already in use`.

Also removing use IAvatar; from the top of the UserController I got an error like: Class 'App\Http\Controllers\IAvatar' not found

How can I fix?

pixsiro avatar Feb 14 '17 17:02 pixsiro

try use \IAvatar

vinicius73 avatar Feb 14 '17 17:02 vinicius73

it doesn't work, i got the same error.

pixsiro avatar Feb 14 '17 17:02 pixsiro

@pixsiro If you using for example wampserver 64x, try to use 32x.

I got the same problem in wampserver 64x when I changed to 32x it's worked fine.

[]s

FelipeArruda avatar Nov 08 '17 09:11 FelipeArruda