Skip to content

Welcome to my Laravel-Vue practice referral website! This project follows best practices and is designed to showcase my skills in developing web applications using Laravel and Vue. Users can refer others with a limit, and the platform is built for ease of use and scalability. Join me on this journey of growth and learning in web development!

Notifications You must be signed in to change notification settings

SubheSadek/laravelVueReferralSite

Repository files navigation

LaravelVueReferralSite

This is a starter project for a referral website built with Laravel 9, Vue.js 3, Vite, and Laravel Queue.

Laravel Sail (Docker) Installation

Prerequisites

Before we get started, make sure that you have the following prerequisites installed on your local machine:

  • PHP (minimum version: 8.1)
  • Composer
  • Docker (minimum version: 20.10)
  • Git

To install this project, follow these steps:

  1. Clone the repository to your local machine:
git clone https://github.com/subhesadek/referral_site.git
  1. Navigate to the project directory:
cd referral_site
  1. Set up the environment variables by creating a copy of the .env.example file and renaming it to .env:
cp .env.example .env

4: Install Laravel Sail:

composer require laravel/sail --dev

This command will download and install Laravel Sail and its dependencies in your project's vendor directory.

Or,

docker run --rm \
    -u "$(id -u):$(id -g)" \
    -v "$(pwd):/var/www/html" \
    -w /var/www/html \
    laravelsail/php82-composer:latest \
    composer install --ignore-platform-reqs
    

Note: If you encounter any issues or have any questions, feel free to check out the official Laravel Documentation.

5: Set up Laravel Sail

php artisan sail:install

6: Start Laravel Sail

./vendor/bin/sail up
  1. Generate the application key:
sail artisan key:generate

9: Install & setup NPM

sail npm install && sail npm run dev

Manual Installation

To install this project, follow these steps:

  1. Clone the repository to your local machine:
git clone https://github.com/subhesadek/referral_site.git
  1. Navigate to the project directory:
cd referral_site
  1. Install the project dependencies:
composer install && npm install
  1. Set up the environment variables by creating a copy of the .env.example file and renaming it to .env:
cp .env.example .env
  1. Generate the application key:
php artisan key:generate
  1. Run the database migrations:
php artisan migrate
  1. Compile the frontend assets:
npm run dev
  1. Start the Laravel development server:
php artisan serve
  1. Start the Laravel Queue worker:
php artisan queue:table
php artisan migrate
php artisan queue:work
  1. Setup your SMTP email server:

Alt Text

You should now be able to access the application at http://localhost:8000.

PHP Unit Test Case

This repository contains a set of unit tests for a PHP application

  1. To run the tests, simply execute the following command from the root directory of the repository:
php artisan test

For laravel sail

sail artisan test

or

./vendor/bin/phpunit

Usage

The application has a simple referral system that allows users to share a referral link with their friends. When someone signs up using the referral link, the referrer earns a reward.

To test the referral system, you can create a new user account and share your referral link with another user. When the other user signs up using the referral link, you should see a reward credited to your account.

License

This project is licensed under the MIT License. See the LICENSE file for more information.

About

Welcome to my Laravel-Vue practice referral website! This project follows best practices and is designed to showcase my skills in developing web applications using Laravel and Vue. Users can refer others with a limit, and the platform is built for ease of use and scalability. Join me on this journey of growth and learning in web development!

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published