digitaldreams/laracrud

Namespace issues

bromine355 opened this issue · 3 comments

I am getting namespace conflicts on "Model" or "Controller":

php artisan laracrud:model activity_type ActivityType
PHP Fatal error:  Cannot use LaraCrud\Crud\Model as Model because the name is already in use in C:\**********\vendor\digitaldream\laracrud\src\lara-crud\Console\View.php on line 7

In View.php line 7:

  Cannot use LaraCrud\Crud\Model as Model because the name is already in use

I updated Console\View.php to import like:

use LaraCrud\Crud\Model as ModelCrud;

But then I just get this one.

php artisan laracrud:model activity_type ActivityType

PHP Fatal error:  Cannot use LaraCrud\Crud\Controller as Controller because the name is already in use in C:\*********\vendor\digitaldream\laracrud\src\lara-crud\Console\Mvc.php on line 7

In Mvc.php line 7:

  Cannot use LaraCrud\Crud\Controller as Controller because the name is already in use

Have you encountered this before? PHP version 5.6.37 and my composer requires look like this:

"require": {
      "php": ">=5.6.4",
      "laravel/framework": "5.4.*",
      "laravel/tinker": "~1.0",
      "digitaldream/laracrud": "3.*"
    },

Hi @bromine355
Thanks for inform me.
I have not face this before.
I will check it and if found then let you know.

Anyway
Really appreciate your time and effort
Regards
Tuhin

Ok. Probably the php version then. I'll try on php 7 today and see if that resolves it. Thanks for the quick reply.

I have confirmed that this is working on php 7.2.