Download the PHP package nncodes/laravel-meeting without Composer
On this page you can find all versions of the php package nncodes/laravel-meeting. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download nncodes/laravel-meeting
More information about nncodes/laravel-meeting
Files in nncodes/laravel-meeting
Package laravel-meeting
Short Description Handle online meeting with Laravel
License MIT
Homepage https://github.com/99codes/laravel-meeting
Informations about the package laravel-meeting
Laravel Meeting
Official Documentation
- Introduction
- Requirements
- Installation & setup
- Preparing your models
- Scheduler
- Presenter
- Host
- Participant
- Scheduling a meeting
- Retrieving meetings
- Eloquent scopes
- Handling a scheduled meeting
- Meeting
- Participants
- Hosts
- Contributing
- Security Vulnerabilities
- License
Introduction
This package can handle online meetings with Eloquent models. It provides a simple, fluent API to work with and by default uses Zoom as provider.
Requirements
This package requires PHP 7.3+ and Laravel 6+.
This package uses nncodes/meta-attributes
to attach meta attributes to the models.
Installation & setup
You can install the package via composer:
The package will automatically register itself.
You can use the meeting:install
command to publish the migrations and use --config
if you also want to publish the config file.
Or you can publish by the traditional way:
After the migration has been published you can create the tables by running the migrations:
You can publish the config file with:
This is the contents of the published config file:
Preparing your models
Scheduler
Responsible for scheduling the meeting, the model must implement the following interface and trait:
Presenter
Responsible for present the meeting, the model must implement the following interface and trait:
Host
Responsible for hosting the meeting, the model must implement the following interface and trait:
Participant
Allowed to join a meeting, the model must implement the following interface, trait and the getEmailAddress
, getFirstName
and getLastName
methods:
Scheduling a meeting
To schedule a meeting you need to use the methods below to properly fill the meeting data:
Or you can also schedule by the scheduler
model:
Of course if needed, you can update the meeting:
Then you can add a participant:
To provide the access to the presenter use:
And for the participant use:
More: handling a scheduled meeting.
Retrieving meetings
You can just call from the meeting model:
Scoping meetings by Nncodes\Meeting\Models\Meeting
.
or call meetings()
from any actor:
Scoping meetings from scheduler model, e.g. App\Models\Event
with id:1
.
Scoping meetings from presenter model, e.g. App\Models\Teacher
with id:1
.
Scoping meetings from host model, e.g. App\Models\Room
with id:1
.
Scoping meetings from participant model, e.g. App\Models\Student
with id:1
.
Eloquent scopes
General scopes
scoping by uuid
, e.g b33cac3a-c8da-4b33-a296-30a6acff5af6
.
scoping by id
, e.g 1
.
scoping by provider, e.g. zoom
.
Scopes for start_time
, started_at
and ended_at
scoping by start time from, e.g. 15 days ago
.
scoping by start time until, e.g. 15 days from now
.
Or scoping by start time within a period, e.g. from 15 days ago
and 15 days from now
.
scoping by status live
, the started but not ended meetings.
scoping by status past
, the started and ended meetings.
scoping by status scheduled
, the not started meetings.
scoping by scheduled
status and where start_time
is past. Queries the late to start meetings.
scoping by live
status and where started_at
+ duration
is past. Queries the meetings that had exceeded the scheduled duration.
scoping by scheduled
status ordering by start_time
asc. Queries the next neetings
scoping by last
status ordering by ended_at
desc queries the last meetings
Scopes for actors
scoping by scheduler, e.g. App\Models\Event
with id:1
.
scoping by host, e.g. App\Models\Room
with id:1
.
scoping by participant, e.g. App\Models\Student
with id:1
.
scoping by presenter, e.g. App\Models\Teacher
with id:1
.
Finally to retrieve the data you can call any eloquent retriever method, e.g. count
, first
, get
, paginate
and etc.
Handling a scheduled meeting
Meeting
When using zoom provider, you can set share_rooms
to true
, then you don't need to inform a host when scheduling a meeting. The package handles the allocation of rooms.
In this case you can schedule using:
If no rooms is available the expcetion \Nncodes\Meeting\Exceptions\NoZoomRoomAvailable
is thrown.
Starting a meeting.
Ending a meeting.
Canceling a meeting.
Participants
Add a participant
Adding a participant by Nncodes\Meeting\Models\Meeting
Adding a participant by participant model App\Models\Student
Cancel a participation
Canceling a participation by Nncodes\Meeting\Models\Meeting
Adding a participant by participant model App\Models\Student
Join meeting
Joining by Nncodes\Meeting\Models\Meeting
Joining by participant model App\Models\Student
Leave meeting
Leaving by Nncodes\Meeting\Models\Meeting
Leaving by participant model App\Models\Student
Getting participants
Getting a participant
Checking if a meeting has a participant:
Getting a list of participants using the morphMany relationship:
Or using the participantsPivot relation.
Getting the first participant ordering by created_at
desc, it allows to use a meeting as queue mode service.
Hosts
Scoping and verification methods
Given the code:
Scoping an available host:
Scoping a busy host:
Scoping busy and available hosts except for a meeting
Then you can call any eloquent retriever method, e.g. count
, first
, get
, paginate
and etc.
You can also check if a room instance is busy or available:
As the scope methods, you can also specify meeting to exclude from the query:
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
- Leonardo Poletto
- All Contributors
License
The MIT License (MIT). Please see License File for more information.
All versions of laravel-meeting with dependencies
guzzlehttp/guzzle Version ^6.0|^7.0
illuminate/contracts Version ^6.0|^7.0|^8.0
nncodes/laravel-meta-attributes Version ^2.0