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

cloud4bpm's avatar

Using php artisan app:name with complex names

Hi,

I'm trying to use app:name with a custom psr-4 namespace for example:

php artisan app:name Organization\AppName

Is possible use the app:name with custom namespaced apps? Is not possible is there any other way to make it possible?

Thanks

0 likes
7 replies
mstnorris's avatar
Level 55

I don't think it would work, although have you tried escaping the backslash? Just a guess but don't count on it.

php artisan app:name Organization\\AppName

Why not keep it simple:

php artisan app:name Organization-AppName ??

cloud4bpm's avatar

Great @mstnorris is working fine. I think there is not problem using this feature.

Thanks again for your help.

mstnorris's avatar

What worked? Escaping the backslash like so \\ ?

cloud4bpm's avatar

Yes, sorry your answer was updated before :-)

Yes the \ is working fine.

I'd like to use the Organization\AppName for make another apps or subapps using namespaces as other repositories do (in example Laravel with Laravel, Framework, Envoy, ...)

Thanks again.

1 like
cloud4bpm's avatar

Ups, using local environment "not Homestead" is working, if you use Homestead is not working.

mstnorris's avatar

Can you start a new question and paste the error you're receiving.

cloud4bpm's avatar

I made it within the locally folder instead using the ssh connection for run the app:name artisan command.

The result is that I was expecting.

Thanks for your help.

1 like

Please or to participate in this conversation.