Package: consultations
Generated from api/packages/consultations
Source: api/packages/consultations · imported version 0.3.11. The sections after the README are extracted from the code on every docs build.
README
Section titled “README”One to one conversation package
What does it do
Section titled “What does it do”This package is used for creating Consultation for Ulams.
Installing
Section titled “Installing”composer require ulams/consultationsphp artisan migratephp artisan db:seed --class="Ulams\Consultations\Database\Seeders\ConsultationsPermissionSeeder"
Schedule
Section titled “Schedule”- In App\Console\Kernel to method schedule add
$schedule->job(new ReminderAboutConsultationJob(ConsultationTermReminderStatusEnum::REMINDED_HOUR_BEFORE))->everyFiveMinutes()- reminder about to consultation before one hour, executed every 5 minutes$schedule->job(new ReminderAboutWebinarJob(ConsultationTermReminderStatusEnum::REMINDED_DAY_BEFORE))->everySixHours();- reminder about to consultation before one day, executed every 6 hours
Endpoints
Section titled “Endpoints”All the endpoints are defined in
Run ./vendor/bin/phpunit --filter=Consultation to run tests. See tests folder as it’s quite good staring point as documentation appendix.
Events
Section titled “Events”Ulams\Consultations\Events\ApprovedTerm=> Event is dispatched when trainer approved term reported with buyer. Event refers to users, who have permissions studentsUlams\Consultations\Events\ApprovedTermWithTrainer=> Event is dispatched when trainer approved term reported with buyer. Event refers to users, who have permissions tutorUlams\Consultations\Events\ChangeTerm=> Event is dispatched when trainer changes term in buyed consultations. Event refers to users, who have permissions studentsUlams\Consultations\Events\RejectTerm=> Event is dispatched when trainer rejects term reported with buyer. Event refers to users, who have permissions studentsUlams\Consultations\Events\RejectTermWithTrainer=> Event is dispatched when trainer rejects term reported with buyer. Event refers to users, who have permissions tutorUlams\Consultations\Events\ReminderAboutTerm=> Event is dispatched after execute cron jobUlams\Consultations\Jobs\ReminderAboutConsultationJob, Event is dispatched when deadline for purchased consultation before 1 hours and 1 day. Event refers to users, who have permissions studentsUlams\Consultations\Events\ReminderTrainerAboutTerm=> Event is dispatched some time before start consultation. Event refers to users, who have permissions tutorUlams\Consultations\Events\ReportTerm=> Event is dispatched after reported term with buyer consultation
Listeners
Section titled “Listeners”Ulams\Webinar\Listeners\ReminderAboutTermListener=> Listener execute a method that singed the status in the webinar reminder
How to use this on frontend.
Section titled “How to use this on frontend.”Admin panel
Section titled “Admin panel”Left menu

List of consultations

Creating/editing consultation

Front Application
Section titled “Front Application”See implementation in the demo.
Permissions
Section titled “Permissions”Permissions are defined in seeder
Database relation
Section titled “Database relation”AuthorConsultation is related belong to with UserProposedTermsConsultation model has many to models ConsultationProposedTermCategoriesConsultation belongs to many with models CategoriesUsersConsultation is related belongs to many with User which bought consultationTermsConsultation model has many to models ConsultationUserPivot. It is reported terms
Consultation 1 -> 1 AuthorConsultation 1 -> n ProposedTermsConsultation 1 -> n CategoriesConsultation 1 -> n UsersConsultation 1 -> n TermsMore documentation in the package
Section titled “More documentation in the package”- api/packages/consultations/ADMIN.md
- api/packages/consultations/docs/list.png
- api/packages/consultations/docs/menu.png
- api/packages/consultations/docs/new_consultation.png
API endpoints
Section titled “API endpoints”| Method | Path | Auth | Action |
|---|---|---|---|
POST |
/api/admin/consultations/{id} |
yes | ConsultationController@update |
GET |
/api/admin/consultations |
yes | ConsultationController@index |
GET |
/api/admin/consultations/create |
yes | ConsultationController@create |
POST |
/api/admin/consultations |
yes | ConsultationController@store |
GET |
/api/admin/consultations/{id} |
yes | ConsultationController@show |
GET |
/api/admin/consultations/{id}/edit |
yes | ConsultationController@edit |
PUT|PATCH |
/api/admin/consultations/{id} |
yes | ConsultationController@update |
DELETE |
/api/admin/consultations/{id} |
yes | ConsultationController@destroy |
GET |
/api/admin/consultations/{id}/schedule |
yes | ConsultationController@schedule |
POST |
/api/admin/consultations/change-term/{consultationTermId} |
yes | ConsultationController@changeTerm |
GET |
/api/admin/consultations/users/assignable |
yes | ConsultationController@assignableUsers |
GET |
/api/consultations/me |
yes | ConsultationAPIController@forCurrentUser |
GET |
/api/consultations/my-schedule |
yes | ConsultationAPIController@schedule |
POST |
/api/consultations/report-term/{consultationTermId} |
yes | ConsultationAPIController@reportTerm |
GET |
/api/consultations/proposed-terms/{consultationTermId} |
yes | ConsultationAPIController@proposedTerms |
GET |
/api/consultations/approve-term/{consultationTermId} |
yes | ConsultationAPIController@approveTerm |
GET |
/api/consultations/reject-term/{consultationTermId} |
yes | ConsultationAPIController@rejectTerm |
GET |
/api/consultations/generate-jitsi/{consultationTermId} |
yes | ConsultationAPIController@generateJitsi |
POST |
/api/consultations/change-term/{consultationTermId} |
yes | ConsultationController@changeTerm |
POST |
/api/consultations/finish-term/{consultationTermId} |
yes | ConsultationAPIController@finishTerm |
GET |
/api/consultations |
ConsultationAPIController@index |
|
GET |
/api/consultations/{id} |
ConsultationAPIController@show |
Permissions
Section titled “Permissions”| Permission | Seeded for roles | Constant |
|---|---|---|
consultation_list |
admin | ConsultationsPermissionsEnum::CONSULTATION_LIST |
consultation_list-own |
tutor | ConsultationsPermissionsEnum::CONSULTATION_LIST_OWN |
consultation_create |
admin, tutor | ConsultationsPermissionsEnum::CONSULTATION_CREATE |
consultation_update |
admin | ConsultationsPermissionsEnum::CONSULTATION_UPDATE |
consultation_update-own |
tutor | ConsultationsPermissionsEnum::CONSULTATION_UPDATE_OWN |
consultation_delete |
admin | ConsultationsPermissionsEnum::CONSULTATION_DELETE |
consultation_delete-own |
tutor | ConsultationsPermissionsEnum::CONSULTATION_DELETE_OWN |
consultation_read |
admin | ConsultationsPermissionsEnum::CONSULTATION_READ |
consultation_read-own |
tutor | ConsultationsPermissionsEnum::CONSULTATION_READ_OWN |
consultation_change_term |
admin, tutor | ConsultationsPermissionsEnum::CONSULTATION_CHANGE_TERM |
Settings
Section titled “Settings”Registered with AdministrableConfig::registerConfig (editable in the admin panel under Configuration → Settings).
None.
Events
Section titled “Events”| Event | Description | Notification templates |
|---|---|---|
ApprovedTerm |
Email, Sms | |
ApprovedTermWithTrainer |
Email, Sms | |
ChangeTerm |
||
RejectTerm |
Email, Sms | |
RejectTermWithTrainer |
Email, Sms | |
ReminderAboutTerm |
Email, Email, Sms | |
ReminderTrainerAboutTerm |
Email, Sms | |
ReportTerm |
Email, Sms |
Notification templates registered here
Section titled “Notification templates registered here”None.
Artisan commands
Section titled “Artisan commands”| Command | Description | Signature |
|---|---|---|
meetings:purge-frames |
Delete stored consultation and webinar webcam frames (never the images folders) | meetings:purge-frames {--dry-run : Only list what would be deleted} |
Scheduled jobs
Section titled “Scheduled jobs”None.
Environment variables read
Section titled “Environment variables read”AWS_URL