How to remove public from url in laravel, after git clone server error
How to remove public from url in laravel 9 For Local
i got the answer
we can don this by :-
cutting and pasting index.php & htaccess from public folder to root directory and the edit in index.php
just change:-
/../vender/autoload.php to ./vender/autoload.php
and $app= /../vender/app.php to $app = ./vender/app.php
For Server
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^(.*)$ public/$1 [L]
</IfModule>
After git clone server error
When you are cloning a Laravel project from GitHub, you have to :
- Run
composer install
on your cmd or terminal
- Copy
.env.example
file to .env
on the root folder
- Open your
.env
file and change the database name (DB_DATABASE
) to whatever you have, username (DB_USERNAME
) and password (DB_PASSWORD
) field correspond to your configuration
- Run
php artisan key:generate
- Run
php artisan migrate
- Run
php artisan serve
- Go to http://localhost:8000/
Comments
Post a Comment