joybusinessacademy / pkg-profile
A profile package for JBA projects
This package's canonical repository appears to be gone and the package has been frozen as a result.
Requires
- aws/aws-sdk-php-laravel: ^3.3
- doctrine/dbal: ^2.7@dev
- league/flysystem-aws-s3-v3: ^1.0@dev
Requires (Dev)
- orchestra/testbench: ^4.0
This package is auto-updated.
Last update: 2021-08-15 05:09:10 UTC
README
JBA Profile is a Laravel package to manage user's profile and relevant data ...
Installation
Use composer to install
composer require joybusinessacademy/pkg-profile
For Windows OS, please use parameter --ignore-platform-reqs
Usage
Publish vendor migration, config and seeder files
php artisan vendor:publish --provider="JoyBusinessAcademy\Profile\ProfileServiceProvider"
When published, the config/jba-profile.php
initially contains
We use Gateway Pattern
to organize all functionality, please extends the JoyBusinessAcademy\Profile\ProfileGateway to customize your own gateway
gateway => \JoyBusinessAcademy\Profile\ProfileGateway::class
The model you want to use as a Profile model needs to implement the JoyBusinessAcademy\Profile\Models\Profile contract
models.profile => JoyBusinessAcademy\Profile\Models\Profile
The model you want to use as a Region model needs to implement the JoyBusinessAcademy\Profile\Models\Region contract
models.region => JoyBusinessAcademy\Profile\Models\Region
The model you want to use as a User model needs to use JoyBusinessAcademy\Profile\Traits\HasProfile trait
models.region => JoyBusinessAcademy\Profile\Models\User
We have chosen a default table names but you may easily change it to any table you like
table_names.profiles => 'profiles'
table_names.regions => 'regions'
table_names.users => 'users'
We use Repository Pattern
to separate business logic with data layer, please extends the JoyBusinessAcademy\Profile\Repositories\ProfileRepository to customize your own repository
repostories.profile => \JoyBusinessAcademy\Profile\Repositories\ProfileRepository::class
Run Region Seeder
php artisan db:seed --class=RegionSeeder