1. Go to this page and download the library: Download djoudi/bbb-laravel5.5 library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
djoudi / bbb-laravel5.5 example snippets
namespace App\Http\Controllers;
class MeetingController extends Controller
{
/**
* @var \Djoudi\Bigbluebutton\Contracts\Meeting
*/
protected $meeting;
public function __construct(Meeting $meeting)
{
$this->meeting = $meeting;
}
/**
* Returns a list of meetings
*/
public function all()
{
$meetings = $this->meeting->all();
if ($meetings) {
// do something with meetings
}
}
use Djoudi\Bigbluebutton\Contracts\Meeting;
use BigBlueButton\Parameters\CreateMeetingParameters;
use Illuminate\Http\Request;
class MeetingController extends Controller
{
/**
* @var \Djoudi\Bigbluebutton\Contracts\Meeting
*/
protected $meeting;
public function __construct(Meeting $meeting)
{
$this->meeting = $meeting;
}
/**
* Create a bigbluebutton meeting
*
* @param \Illuminate\Http\Request $request
* @return void
*/
public function create(Request $request)
{
$meetingParams = new CreateMeetingParameters($request->meetingId, $request->meetingName);
$meetingParams->setDuration(40);
$meetingParams->setModeratorPassword('supersecretpwd');
if ($this->meeting->create($meetingParams)) {
// Meeting was created
}
}
use Djoudi\Bigbluebutton\Contracts\Meeting;
use BigBlueButton\Parameters\JoinMeetingParameters;
use Illuminate\Http\Request;
class MeetingController extends Controller
{
/**
* @var \Djoudi\Bigbluebutton\Contracts\Meeting
*/
protected $meeting;
public function __construct(Meeting $meeting)
{
$this->meeting = $meeting;
}
/**
* Join a bigbluebutton meeting
*
* @param \Illuminate\Http\Request $request
* @return void
*/
public function join(Request $request)
{
$meetingParams = new JoinMeetingParameters($request->meetingID, $request->meetingName, 'MyMeetingPassword');
$meetingParams->setRedirect(true);
$meetingUrl = $this->meeting->join($meetingParams);
redirect()->setTargetUrl($meetingUrl);
}
}
use Djoudi\Bigbluebutton\Contracts\Meeting;
use BigBlueButton\Parameters\EndMeetingParameters;
use Illuminate\Http\Request;
class MeetingController extends Controller
{
/**
* @var \Djoudi\Bigbluebutton\Contracts\Meeting
*/
protected $meeting;
public function __construct(Meeting $meeting)
{
$this->meeting = $meeting;
}
/**
* End a bigbuebutton meeting
*
* @param \Illuminate\Http\Request $request
* @return void
*/
public function close(Request $request)
{
$meetingParams = new EndMeetingParameters($request->meetingID, $request->moderator_password);
$this->meeting->close($meetingParams);
}
}
Meeting::all(); //get a list of all meetings
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.