I was trying to publish my new laravel project using Forge+DigitalOcean but I get the error message (We were unable to install a project on your server) due to php artisan optimize
command returning Invalid filename provided.
error.
So I modified my .env file and set APP_DEBUG to false and tried to run the command locally. I got the following error:
php artisan optimize -v
Generating optimized class loader Compiling common classes [RuntimeException] Invalid filename provided.
Exception trace: () at /home/bubut/Code/TalalAttendance/vendor/classpreloader/classpreloader/src/ClassPreloader.php:105 ClassPreloader\ClassPreloader->getCode() at /home/bubut/Code/TalalAttendance/vendor/laravel/framework/src/Illuminate/Foundation/Console/OptimizeCommand.php:89 Illuminate\Foundation\Console\OptimizeCommand->compileClasses() at /home/bubut/Code/TalalAttendance/vendor/laravel/framework/src/Illuminate/Foundation/Console/OptimizeCommand.php:70 Illuminate\Foundation\Console\OptimizeCommand->fire() at n/a:n/a call_user_func_array() at /home/bubut/Code/TalalAttendance/bootstrap/cache/compiled.php:1138 Illuminate\Container\Container->call() at /home/bubut/Code/TalalAttendance/vendor/laravel/framework/src/Illuminate/Console/Command.php:150 Illuminate\Console\Command->execute() at /home/bubut/Code/TalalAttendance/vendor/symfony/console/Command/Command.php:258 Symfony\Component\Console\Command\Command->run() at /home/bubut/Code/TalalAttendance/vendor/laravel/framework/src/Illuminate/Console/Command.php:136 Illuminate\Console\Command->run() at /home/bubut/Code/TalalAttendance/vendor/symfony/console/Application.php:827 Symfony\Component\Console\Application->doRunCommand() at /home/bubut/Code/TalalAttendance/vendor/symfony/console/Application.php:191 Symfony\Component\Console\Application->doRun() at /home/bubut/Code/TalalAttendance/vendor/symfony/console/Application.php:122 Symfony\Component\Console\Application->run() at /home/bubut/Code/TalalAttendance/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php:100 Illuminate\Foundation\Console\Kernel->handle() at /home/bubut/Code/TalalAttendance/artisan:36