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?

5
  • 4
    Possible duplicate of Can a namespace start with a number in PHP? Commented Jun 4, 2018 at 8:46
  • app:name means your namespace is going to be renamed. A PHP namespace cannot start with a number Commented Jun 4, 2018 at 8:47
  • yes, the 1BV starts with number, its pretty tricky to have that on most programming language.. Commented Jun 4, 2018 at 8:50
  • How do I reverse the stupid thing I have done? Because I cannot use the "automatic" rename command... shit Commented Jun 4, 2018 at 8: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..... Commented Jun 4, 2018 at 9:02

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.