简体   繁体   中英

Issues using php artisan on a laravel 5.7.* app

I've been trying to work on a laravel app but I can't even make it start.

I've run composer install , composer global update , composer udpate , composer self-update and several other commands,

I've deleted the vendor folder, the composer.lock file, re-ran composer install and things I've found online to no avail. This is the error I keep getting:

@php artisan package:discover

  In Container.php line 779:

  Class request does not exist  

Script @php artisan package:discover handling the post-autoload-dump event returned with error code 1

Not sure where to go next. Any ideas?

I would suggest you remove your composer itself and re-install the composer. the try install you laravel packages with it.

Try clearing application cache using this command: php artisan cache:clear

The cache:clear command can be used to clear the applications cache files.

Don't worry about your laravel

  1. check composer correctly installed on your system
  2. check composer have access for READ and WRITE in your system

    • after your sure about things check your laravel install in your system for PHP you have and find specific you php version composer connected to it (Those who have multi PHP)

then have two option:

  1. composer global require laravel/installer
  2. then laravel new blog or
    1. composer create-project --prefer-dist laravel/laravel blog
    2. then go to folder cd /projectName

Use PHP's built-in development server: php artisan serve

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