I install the sleeping-owl 2 admin panel into the laravel 5.1 project ( http://sleeping-owl.imtqy.com/ru/Getting_Started/Model_Configuration.html ) ... All data is entered into the specified files: composer.json, config / app.php . I enter the command:

php artisan admin:install 

And I get an error:

 PHP Fatal error: Cannot use 'String' as class name as it is reserved in /var/www/projects/blog.laravel.com/vendor/sleeping-owl/admin/src/SleepingOwl/Admin/Columns/Column/String.php on line 3 [Symfony\Component\Debug\Exception\FatalErrorException] Cannot use 'String' as class name as it is reserved 

I find this file in the installed folder with the installed files:

  <?php namespace SleepingOwl\Admin\Columns\Column; class String extends BaseColumn {... } 

"String" is underlined with a red line and indicates that a class with the name int, bool, string is prohibited to use in php 7 !!!!! And the code may be incompatible .... Ie class String need to be replaced with some other name ??? or sleeping-owl 2 can not then be put on php 7. Help me figure it out ....

I understand that the versions do not match ...... I decided to install the newest version ... sleepingowl 4 ( http://sleepingowladmin.ru/docs/ ) ... I also made changes to the files ... Packages all set and pack up ... I enter the command:

 php artisan sleepingowl:install 

...gives an error message :

 [ErrorException] Invalid argument supplied for foreach() 

Invalid argument for foreach () ... but already there are no instructions in which file and which line ...... PHP 7.0 laravel 5.1 sleepingowl 4 I have .... maybe there is something wrong with the picking ??? ?

    2 answers 2

    On PHP 7.0, you need to install laravel 5.3 and connect sleepingowl 4! In this complex, everything is put!

      Compatibility issue with PHP7 fixed almost a year ago: github: Compatibility with PHP 7

      The class was then renamed Text .

      It is worth updating the package.

      • I just recently updated php to version 7, have not yet felt all the features .... thanks, I will try - Alexander
      • Update not php, but SleepingOwl - xEdelweiss
      • I updated php a week ago or 2 weeks ..... and here I just started to out the sleepingowl - Alexander