This guide provides step-by-step instructions for setting up Funeral App.
Before starting, ensure your system has:
- PHP 8.1 or higher
- Composer (PHP package manager)
- Node.js and npm (for frontend assets)
- MySQL or PostgreSQL database
- Apache or Nginx web server
- Git
Download Laragon from here:Laragon Download It comes with everything you need to start local development on Windows, after installing Laragon, skip to step 3
# Update package manager
sudo apt update
# Install PHP and common extensions
sudo apt install php8.1 \
php8.1-cli \
php8.1-common \
php8.1-curl \
php8.1-mbstring \
php8.1-mysql \
php8.1-xml \
php8.1-zip \
php8.1-bcmath \
unzip
# Install Node.js and npm using nvm (Node Version Manager)
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash
# Reload shell configuration
source ~/.bashrc
# Install latest LTS version of Node.js
nvm install --lts
Download and install the composer .exe from here: Composer .exe Download
# Download Composer installer
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
# Install Composer globally
sudo php composer-setup.php --install-dir=/usr/local/bin --filename=composer
# Remove installer
php -r "unlink('composer-setup.php');"
# Create new Laravel project
git clone [email protected]:oheneadj/funeralapp.git
# Navigate to project directory
cd your-project-name
copy .env.example and rename it to .env
# Generate application key
php artisan key:generate
Update the following variables in .env
:
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=your_database_name
DB_USERNAME=your_username
DB_PASSWORD=your_password
# Install PHP dependencies
composer install
# Install Node.js dependencies
npm install
# Compile assets
npm run dev
# Start Laravel development server
php artisan serve
Your application will be available at http://localhost:8000
# Create new migration
php artisan make:migration create_table_name
# Run migrations
php artisan migrate
# Create new controller
php artisan make:controller ControllerName
# Create new model
php artisan make:model ModelName
# Clear application cache
php artisan cache:clear
# List all available artisan commands
php artisan list
-
If you encounter permission issues:
- Verify that storage and bootstrap/cache directories are writable
- Check file ownership and permissions
-
If composer install fails:
- Check PHP version compatibility
- Verify PHP extensions are installed
- Clear composer cache:
composer clear-cache
-
If npm run dev fails:
- Delete node_modules directory and package-lock.json
- Run
npm install
again - Update Node.js to LTS version