Ejemplo n.º 1
0
 public function share(Request $request)
 {
     $room = Room::findOrFail($request->room_id);
     if (!roomController::checkOwner($room)) {
         throw new Exception('Unauthorized');
     }
     $bbb = new BigBlueButton($request->server_id);
     $recUrl = substr($bbb->getUrl(), 0, -14) . 'playback/presentation/0.9.0/playback.html?meetingId=' . $request->rec_id;
     $recordings = self::get($room);
     foreach ($recordings as $rec) {
         if ($rec['id'] == $request->rec_id) {
             $time = $rec['time'];
         }
     }
     foreach ($room->participants as $part) {
         Mail::send('emails.share_rec', ['recUrl' => $recUrl, 'recTime' => $time, 'owner_mail' => $user->mail], function ($message) use($request, $part) {
             $message->to($part->mail)->subject('Recording Share');
         });
     }
     return redirect()->back()->with('message', trans('room.show.recording.sent'));
 }