Search code examples
phplaravelautoloadvendor

Laravel php artisan doesn't work


I'm trying to use php artisan in my laravel directory but it gives the following warning

PHP Warning:  require(/home/mahmoud/Desktop/Learning/laravel/blog/bootstrap/../vendor/autoload.php): failed to open stream: No such file or directory in /home/mahmoud/Desktop/Learning/laravel/blog/bootstrap/autoload.php on line 17
PHP Fatal error:  require(): Failed opening required '/home/mahmoud/Desktop/Learning/laravel/blog/bootstrap/../vendor/autoload.php' (include_path='.:/usr/share/php') in /home/mahmoud/Desktop/Learning/laravel/blog/bootstrap/autoload.php on line 17

Solution

  • try:

    cd /home/mahmoud/Desktop/Learning/laravel/blog
    composer install
    

    you should see the vendor folder under blog directory, if you still have the problem execute composer du