Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Hardkiffeur's avatar

[solve] [5.1] php artisan app:name Name return error

Hi, Under a fresh 5.1 install (a composer one) I've the php artisan app:name MyAppName return me :

[Illuminate\Contracts\Filesystem\FileNotFoundException]
File does not exist at path /var/www/MyAppName/database/factories

And then I look on the services.json create under the /bootstrap/cache folder and I could see some AppName base informations Like under the composer.json I've : "psr-4": { "MyAppName\": "app/" } Note seems under the app.php I've some Application Service Providers with MyAppName, So I think php artisan app:name MyAppName do the job with this Warning/Error. What do you think ? Does this artisan command do the same for You ? What I could do to be sure MyAppName namesapce is normaly done.

0 likes
2 replies
phildawson's avatar
➜  www  composer create-project laravel/laravel --prefer-dist
➜  www  cd laravel
➜  laravel  php artisan app:name MyAppName
Application namespace set!

All seems fine to me?

Hardkiffeur's avatar

Seems ok now, after re-boot server ... perhaps a cache issue

Please or to participate in this conversation.