0

Had a Laravel App running on a remote server.

I wanted to change the App name, so from the home directory of my application I entered the command "php artisan app:name 1BV"

I thought this process was foolproof since artisan will take care of changing all the necessary config files.

However it's not the case, and when I try to view my website I get Error 500. If I try to run any command with "php artisan" like to re install or reverse to the original name "app", I get the following error in the command line:

root@Debian-87-jessie-64-minimal:/home/noman/iotx# php artisan app:name app
PHP Parse error:  syntax error, unexpected 'BV' (T_STRING), expecting ',' or 
')' in /home/noman/iotx/bootstrap/app.php on line 31

FILE: /bootstrap/app.php around line 31 */

$app->singleton(
    Illuminate\Contracts\Http\Kernel::class,
    1BV\Http\Kernel::class
);

$app->singleton(
   Illuminate\Contracts\Console\Kernel::class,
   1BV\Console\Kernel::class
);

$app->singleton(
    Illuminate\Contracts\Debug\ExceptionHandler::class,
    1BV\Exceptions\Handler::class
);

My question is: how do I fix this project which has been named beginning with a number, or am I forced to reset and restart completely?

anaheim
  • 103
  • 4
  • 4
    Possible duplicate of [Can a namespace start with a number in PHP?](https://stackoverflow.com/questions/33875380/can-a-namespace-start-with-a-number-in-php) – Nico Haase Jun 04 '18 at 08:46
  • `app:name` means your namespace is going to be renamed. A PHP namespace cannot start with a number – Alex Jun 04 '18 at 08:47
  • yes, the `1BV` starts with number, its pretty tricky to have that on most programming language.. – Bagus Tesa Jun 04 '18 at 08:50
  • How do I reverse the stupid thing I have done? Because I cannot use the "automatic" rename command... shit – anaheim Jun 04 '18 at 08:56
  • My question is not, why do I get Error 500, it's how can I reverse what I did to not get it anymore..... – anaheim Jun 04 '18 at 09:02

0 Answers0