📦 Installation Guide

Complete setup instructions for ProfileHub Laravel Extension

Prerequisites

Requirement Minimum Version Recommended Notes
PHP 7.1 8.0+ Required for Laravel compatibility
Laravel 5.8 9.0+ Framework requirement
Composer 2.0 Latest Package management
MySQL 5.7 8.0+ Database requirement
Node.js 14.x 18.x+ For asset compilation (optional)
⚠️ Important: Ensure your Laravel application is properly configured and running before installing ProfileHub. Back up your database before proceeding with the installation.

Installation Steps

Step 1: Install via Composer

Install the ProfileHub package using Composer in your Laravel project root directory:

composer require baberuka/profilehub
💡 Note: If you're using Laravel 5.5 or higher, the package will be auto-discovered. For older versions, manual registration is required.
Step 2: Service Provider Registration (Laravel < 5.5)

If you're using Laravel version older than 5.5, manually register the service provider in config/app.php:

'providers' => [ // Other Service Providers... BabeRuka\ProfileHub\Providers\ProfileHubServiceProvider::class, ],
Step 3: Publish Package Assets

Publish the package configuration, views, and assets to your Laravel application:

Publish Configuration Files

php artisan vendor:publish --tag=profilehub-config

Publish View Templates

php artisan vendor:publish --tag=profilehub-views

Publish Static Assets

php artisan vendor:publish --tag=profilehub-assets

Publish All Assets at Once

php artisan vendor:publish --provider="BabeRuka\ProfileHub\Providers\ProfileHubServiceProvider"
📁 Published Files: This will publish configuration files to config/, views to resources/views/vendor/profilehub/, and assets to public/vendor/profilehub/.
Step 4: Database Migration

Run the ProfileHub specific migrations to create the required database tables:

Run ProfileHub Migrations

php artisan profilehub:migrate

Run Standard Laravel Migrations

php artisan migrate
✅ Database Tables Created: This will create all necessary tables including users, user_profiles, user_fields, countries, and other supporting tables.

Available Database Tables

Table Name Purpose
user_profilesCore user profile information
user_fieldCustom profile field definitions
user_field_groupsField organization and grouping
user_field_detailsUser-specific field data
user_groupsUser group management
countriesInternational country data
country_statesState/province information
pagesDynamic page management
page_widgetsPage layout and widgets
Step 5: Seed Database (Optional)

Optionally populate the database with sample data and default configurations:

php artisan db:seed --class="BabeRuka\ProfileHub\Database\Seeders\DatabaseSeeder"
🌱 Seeded Data Includes:
  • Country and state data
  • Default field types
  • Sample page configurations
  • Basic user groups
Step 6: Configure Environment

Update your .env file with ProfileHub specific configurations:

# ProfileHub Configuration PROFILEHUB_FORCE_PROFILE_UPDATE=true PROFILEHUB_PROFILE_PHOTO_PATH=profile-photos PROFILEHUB_DEFAULT_AVATAR=default.png # File Upload Configuration UPLOAD_MAX_FILESIZE=10M POST_MAX_SIZE=10M
⚠️ File Permissions: Ensure the storage and public directories have proper write permissions for file uploads.
Step 7: Configure Routes

ProfileHub routes are automatically registered. You can customize route prefixes in the configuration file:

// config/profilehub.php return [ 'route_prefix' => 'profilehub', 'admin_prefix' => 'admin', 'force_profile_update' => true, // ... other configurations ];

Available Routes

# Check available ProfileHub routes php artisan route:list | grep profilehub
Step 8: Verify Installation

Test your ProfileHub installation by visiting the admin dashboard:

http://your-domain.com/profilehub/dashboard
✅ Installation Complete! If you can access the dashboard without errors, ProfileHub has been successfully installed.

Post-Installation Setup

Post-Installation Checklist

Installed File Structure

config/ └── profilehub.php resources/views/vendor/profilehub/ ├── admin/ │ ├── users/ │ ├── profile/ │ └── dashboard/ ├── layouts/ │ ├── admin.blade.php │ └── app.blade.php └── components/ public/vendor/profilehub/ ├── css/ │ ├── profilehub.css │ └── systemroles.css ├── js/ │ ├── profilehub.js │ └── systemroles.js ├── images/ ├── fonts/ └── addons/ ├── bootstrap/ ├── jquery/ ├── datatables/ └── tinymce/

Common Installation Issues

Migration Errors

Issue: Migration fails with foreign key constraints

Solution: Ensure you run php artisan profilehub:migrate before php artisan migrate

Asset Not Found

Issue: CSS/JS files return 404 errors

Solution: Run php artisan vendor:publish --tag=profilehub-assets --force

Permission Denied

Issue: File upload fails

Solution: Set proper permissions: chmod -R 755 storage/ public/

Class Not Found

Issue: ProfileHub classes not found

Solution: Clear cache: php artisan config:clear && php artisan cache:clear