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 :

  1. Run composer install on your cmd or terminal
  2. Copy .env.example file to .env on the root folder
  3. 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
  4. Run php artisan key:generate
  5. Run php artisan migrate
  6. Run php artisan serve
  7. Go to http://localhost:8000/

Comments

Popular posts from this blog

Sahari

[[ ROYAL CAR ]] CHANGE PASSWORD - DYNAMIC BANNER - MULTIPLE IMAGE - LOGIN LOGOUT BACK BUTTON MIDDLEWARE STOP - MAIL DIRECTLY WITH FEEDBACK WITH SAVE IN SQL DB - ADMIN REPLY EXISTING MAILS - DYNAMICALLY CSS CHANGE

Linux Terminal