简体   繁体   中英

laravel laravelLTE installation issue

I followed the following instructions:

  1. First, I ran:

     composer create-project --prefer-dist laravel/laravel laravelLTE cd laravelLTE php artisan migrate 

    ...which results in the following error:

    [Symfony\\Component\\Debug\\Exception\\FatalErrorException]
    Class 'App\\Providers\\Schema' not found

  2. Then, I modified laravel/app/Providers/AppServiceProvider.php and retried php artisan migrate , but I see the same error as above.

  3. Next, I tried installing the LTE admin template package:

     composer global require "acacha/admin-lte-template-laravel:4.*" 

    ...and then added: Acacha\\AdminLTETemplateLaravel\\Providers\\AdminLTETemplateServiceProvider::class and 'AdminLTE' => Acacha\\AdminLTETemplateLaravel\\Facades\\AdminLTE::class to the 'providers' and 'aliases' arrays in config/app.php .

    After running, composer update , I see the same error as above, followed by this error:

    Script php artisan optimize handling the post-update-cmd event returned with error code 255

  4. Finally, I ran this command:

     php artisan vendor:publish --tag=adminlte -force 

    ...which results in this error:

    [Symfony\\Component\\Debug\\Exception\\FatalErrorException]
    Class 'Acacha\\AdminLTETemplateLaravel\\Providers\\AdminLTETemplateServiceProvider' not found

What am I doing wrong? I am using Laravel 5.4.36 and PHP 5.6.25 .

Also, I am having a problem setting the domain or URL to eg laravel.dev.

Go to App\\Providers and In the AppServiceProvider.php, you did not include the necessary use statement at the top of the file.

use Illuminate\Support\Facades\Schema;

That defines the namespace path to the Schema class so you can simply call

Schema::defaultStringLength(191); 

in the boot method.

Sorry for the delay in response, I had to attend to another project. Thanks very much to you all for the direction and pointing me to the error. The problem was with omitting

use Illuminate\\Support\\Facades\\Schema;

I have been able to complete the installation.

However I am having another problem. When I enter into registration page, clicking the submit button does not do anything for me and it is not inserted into database not even to talk about going into the Home page. What could be wrong? Any help would be appreciated

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM