Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Laravel 5.1 rename project

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?

like image 762
John Does Legacy Avatar asked Mar 22 '16 09:03

John Does Legacy


2 Answers

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

like image 100
Alexey Mezenin Avatar answered Oct 13 '22 21:10

Alexey Mezenin


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

like image 41
lewis4u Avatar answered Oct 13 '22 23:10

lewis4u