php artisan serve [ErrorException] laravel

1.6k views Asked by At

I recently inherited a project based on the laravel framework, which after I have set up, installed all requirements by composer and run php artisan migrations on, will not run via php artisan serve.

When I researched possible causes for this, I came across the following on SO: laravel5: chdir(): No such file or directory (errno 2) Using artisan serve after changing the public folder name

When I follow the suggested solution in the second one of adding the lines ''' $app = new Illuminate\Foundation\Application( realpath(DIR . '/../') ); '''

to bootstrap/app.php I get the same exact error.

Is there a configuration file somewhere I need to update? Most of the suggested solutions I've found like changing files under vendor seem to be rather hacky? I'm really stuck on this and any help would be greatly appreciated - thanks!

2

There are 2 answers

3
Maria Almudena Garcia Fraile F On

check the configuration of your Homestead.yalm folder, there you can specity where your project is in the folders->map section.

0
Haithem DISSEM On

It may the error from composer so try

Composer dump-autoload -o