18

What is the best solution if I want to rename my laravel 5.1 project, I just tried to rename one but it did not work properly got some errors.

Are there some kind of steps one has to do to rename a laravel project?

John Does Legacy
  • 1,441
  • 6
  • 23
  • 33

4 Answers4

31

You should use php artisan app:name command to rename your app. It will change namespace in all project files for you. This is the only right way to rename your app.

https://laravel.com/docs/5.0/configuration#after-installation

Alexey Mezenin
  • 158,981
  • 26
  • 290
  • 279
8

From laravel version 5.3^ there is a function to call the app name

config('app.name');

You can change the default name 'Laravel' inside this file

config/app.php

'name' => 'Laravel',

And also inside .env file

APP_NAME=Laravel

lewis4u
  • 14,256
  • 18
  • 107
  • 148
5

I just recommend to:

  1. go to .env file at APP-NAME =
  2. put your desired name in "" (double quotes)
  3. restart your server

And you're done.

Cindy Meister
  • 25,071
  • 21
  • 34
  • 43
rony
  • 51
  • 1
  • 1
0

You can change your project name using the following command:

php artisan app:name your_git_name\your_app_name
JustCarty
  • 3,839
  • 5
  • 31
  • 51
Ilshat
  • 11