- Turn on xampp
- PHP server
php artisan serve --port=8080
- Turn on npm server
npm run watch
- Add all global setting constants in
custom_lib .blade.php
- custom javascript functions in
common_functions.js
- show loader on user request
profile.js
and search forhide loader
&show loader
- server logs
server_logs
function inhelper.php
- server configuration
php_config
function inhelper.php
- css/js/images folders are meant to be in the root/main folder with sample file names only for local
- Checkout storage on server
df -hi
- global css file
app.css
- sample or generic file
sample_body.blade.php
- use sample view|css|js file to create fresh new view|css|js and update everything accordingly.Copy css|js
files in the root folder of laravel. Don't forget to update
webpack.mix.js
- use
popup_message
function for popup - use
SampleRequest.php
function for Request Validation - use
data_tables.blade.php
file to work withdatatables
e.g.admin_lands.blade.php
- sample migration file
2024_06_19_160520_create_land_comments_table
- define javascript/js constants in
vars.js
- checkout local php syntax config file
pint.json
for normal usuage
./vendor/bin/pint
for not letting change the file
./vendor/bin/pint --test
- deploy with one key
composer deploy
or
composer deploy_without
- js config change
npx eslint -c configs/eslint.config.mjs
- prettier syntax
npx prettier configs/pint.json --write --config configs/.prettierrc.json
npx prettier . --write --config configs/.prettierrc.json
- create storage folder link
php artisan strge:ln
- set repo limit
git config --global http.postBuffer 1048576000
- cloning the repo
git clone https://github.com/NoumanAhmad448/harbourislandcommonage_com
- install xampp (Required PHP version -> 8.2) Download Link
- download node 18.18.0
- Go to .env file and change the DB connection
- Create a database
thesunr8_harbourislandcommonage_com
-
Visit this file database\migrations/2024_06_13_113402_add_super_admin.php and replace your
your_email_here.com
andyour_password_here
for super admin login -
Visit this file and uncomment everything inside
run
method -
Get dump from someone else and upload
-
Visit
bootstrap/cache
and delete every file -
visit
storage/framework
and create following folders -
sessions
-
views
-
cache
-
Run this file
-
Finally 😍😍😍😍😍😍😍 run your project using
php artisan serve --port=8080
- yourwebsite.com/admin/login
- your_email_here.com
- your_password_here
mysql configuration file finder
which mysqld
/usr/sbin/mysqld --verbose --help | grep -A 1 "Default options"
mysql config
/etc/my.cnf
nano /var/lib/mysql/server1.nctest.net.err
mysql connection
mysql -h 127.0.0.1 -P 3306 -u user_name -p
clear user table for local development
DELETE from users;
mysql configuration
systemctl status mysql
or
journalctl -xe
systemctl start mysql
nano /etc/my.cnf
mysql -h 203.161.43.113 -P 3306 -u usmansaleem234_lyskills_root5 -p
Laravel cache clear routes
cd ~/public_html/website_7171ee6c &&
php artisan config:clear
php artisan config:clear
cd ~/public_html/website_7171ee6c &&
php artisan config:cache
php artisan config:cache
cd ~/public_html/website_7171ee6c &&
php artisan route:list
create model with migrations
php artisan make:model name --migration
storage logs
cd ~/public_html/website_7171ee6c/storage/logs/
make/create controller
php artisan make:controller
- https://laravel-news.com/using-aws-s3-for-laravel-storage POV: To find the URL, upload something in bucket and open it in new tab
How to fix 'The file failed to upload.' error using any validation for image upload - Laravel 5.7
- Login to WHM > search
PHP INI editor
> Choose php81 > update the setting according to cpanelINI editor
- apache status
systemctl status httpd
apache configuration file validation command
apachectl configtest
nano conf/httpd.conf
apache configration command
apachectl -V | grep SERVER_CONFIG_FILE
php configration file location for apache server
php --ini
nano /opt/cpanel/ea-php80/root/etc/php.ini
- download
thread safe
php version fromphp.net
- make sure php folder has following files
C:/xampp/php/php8apache2_4.dll
C:/xampp/php/php8ts.dll
- replace
php.ini-development
tophp.ini
- Open
php.ini
file and enable all possible extensions using previousphp.ini
files - Replace following line
curl.cainfo="C:\xampp\apache\bin\curl-ca-bundle.crt"
- Add
extension_dir = "ext"
- restart apache server and make sure all settings are updated in
http://localhost/dashboard/phpinfo.php
- Update php version in
composer.json
- Delete composer.lock and run
composer install
otherwise following may helpcomposer update --lock
and then atleast once trycomposer install
otherwise Runcomposer update
- restart
artisan serve
Back Up on the server
- Fetch SSH connections
- Verify PHP version, composer version && node JS (can be skipped for shared hosting)
- Verify apache/nginx version
- Verify mysql connection
- Create FTP access
- Local setup Laravel
- Change .htaccess/php.ini/user.ini configuration in the main folder of laravel
- Setup PHP configuration from PHP INI editor on the server
- Setup Git & Github repo
- Update
script
in
deployment.yml