Skip to content

Instantly share code, notes, and snippets.

@Bhavya8181
Forked from jack2jm/New Project Setup Code
Created February 12, 2024 05:52
Show Gist options
  • Select an option

  • Save Bhavya8181/e7e10c41635932657fe88ba8a42ac7c5 to your computer and use it in GitHub Desktop.

Select an option

Save Bhavya8181/e7e10c41635932657fe88ba8a42ac7c5 to your computer and use it in GitHub Desktop.
Laravel - New Project Setup to server
Clone project
git clone https://[email protected]/username/project_name
2. run command
composer install
3. create .htaacess file and pase below code.
4. create .env file and paste below code.
================= .env file example ================================
APP_NAME="Project Name"
APP_ENV=local
APP_KEY=base64:dXMN/ka7d4+AKLnfvdV9l3kaOSn2LJbtRHgLNDQdg8c=
APP_DEBUG=true
APP_URL=http://localhost
LOG_CHANNEL=stack
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=database_name
DB_USERNAME=root
DB_PASSWORD=
BROADCAST_DRIVER=log
CACHE_DRIVER=file
SESSION_DRIVER=file
SESSION_LIFETIME=120
QUEUE_DRIVER=sync
REDIS_HOST=127.0.0.1
REDIS_PASSWORD=null
REDIS_PORT=6379
MAIL_DRIVER=smtp
MAIL_HOST=smtp.mailtrap.io
MAIL_PORT=2525
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ENCRYPTION=null
PUSHER_APP_ID=
PUSHER_APP_KEY=
PUSHER_APP_SECRET=
PUSHER_APP_CLUSTER=mt1
MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"
URL_PREFIX="/folder_name/"
=========================== .htaaccess =======================================
<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews -Indexes
</IfModule>
RewriteEngine On
# Handle Authorization Header
RewriteCond %{HTTP:Authorization} .
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteCond %{REQUEST_FILENAME} -d [OR]
RewriteCond %{REQUEST_FILENAME} -f
RewriteRule ^ ^$1 [N]
RewriteCond %{REQUEST_URI} (\.\w+$) [NC]
RewriteRule ^(.*)$ public/$1
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ server.php
</IfModule>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment