Setup Project

git clone < Git Project path > b-website
cd b-website

The project can be setup in two ways. "Native" & "Docker" way

Native Way (Normal Mode)

Prerequisite

  • PHP ^8.1.17
  • Composer 2
  • A database
cp .env.example .env
composer install

Change database credentials

vi (nano) .env

After changing credentials

php artisan migrate --seed

Run project

php artisan serve

You can also configure nginx or apache or any other compatible webserver to start the project

Docker Way

Note: Please ping me if you really need assitance with the Docker Installation.

Prerequisite

  • Docker
  • docker cli & docker-compose general knowledge (helps you a lot)
Usage

Copy .env

cp .env.example .env

Set these key/value pairs in .env (overwrite values as your wish)
Port values are of host. Also setup Cache system

Database Setting

DB_CONNECTION=mysql
DB_HOST=mysql
DB_PORT=3306
DB_DATABASE=bin_website_v9
DB_USERNAME=root
DB_PASSWORD=admin

Fire up containers

docker-compose up -d 

Install composer & migration.
Please run commands below. Again this can be done in two different ways

  1. App Container shell

    docker-compose exec app bash

    Inside app container (/var/www). Command inside () are aliases

    composer install (ci)
    php artisan key:generate (pa key:generate)
    php artisan migrate --seed (pa migrate --seed)
  2. Default Terminal

    docker-compose exec app composer install
    docker-compose exec app php artisan key:generate 
    docker-compose exec app php migrate --seed 

To access mysql shell

docker-compose exec mysql bash
mysql -u root -p

"mysql" can also be accessed with host command

mysql -u root -p -h127.0.0.1 -P<DOCKER_DB_PORT>
Stop containers
docker-compose stop
Stop & remove containers
docker-compose down

==========================================================

Optional Docker Commands

See running containers

docker ps

See running containers (current project)

docker-compose ps

Please feel free to email ([email protected]) if there is any problem regarding docker installation.

Merchant Payment Integration

Add keys in .env (for testing Payment Integrations)

MIN_ADMISSION_AMOUNT=10

ESEWA_EPAY_ENDPOINT=https://uat.esewa.com.np/epay/main
ESEWA_SCD=EPAYTEST
ESEWA_VERIFY_ENDPOINT=https://uat.esewa.com.np/epay/transrec

KHALTI_SECRET_KEY=test_secret_key_2b979ef78ca94c52b2624d85d6fb2e6a
KHALTI_PUBLIC_KEY=test_public_key_094d769b936349189cfc4a404284240d

IMEPAY_GET_TOKEN=https://stg.imepay.com.np:7979/api/Web/GetToken
IMEPAY_VERIFY=https://stg.imepay.com.np:7979/WebCheckout/Checkout
IMEPAY_CONFIRM=https://stg.imepay.com.np:7979/api/Web/Confirm
IMEPAY_REVERIFY=https://stg.imepay.com.np:7979/api/Web/Recheck
IMEPAY_MERCHANT_CODE=BROADWAY  
IMEPAY_MERCHANT_MODULE=BROADWAY
IMEPAY_API_USER=broadwayinfosys
IMEPAY_API_PASS=ime@1234
IMEPAY_IS_TEST=true

Save enquiry to broadway_lab

SAVE_INQUIRY_TO_MIS=true

Certificate (Dompdf)

Add a directory under storage for the certificate to work
mkdir -p storage/fonts
chmod -R 777 storage/fonts

These are just old reference.

Image dimensions

homepage

success_gallery ==> 80 80
logo => 255
77
feature_logo => 53 x 45
professional_it_course => 60 x 60
footer_android_app => 130p x 40
client => 198 x 70
student_testimonials ==> 90 * 90

course_detail_page

course => 120 x 90
student_testimonial => 40 x 40

Successful conversion of image dimensions

courses
success_gallery
testimonails
client
logo