36 lines
663 B
PHP
36 lines
663 B
PHP
<?php
|
|
|
|
namespace Modules\Meeting\Repositories;
|
|
|
|
use Modules\Meeting\Models\Meeting;
|
|
|
|
|
|
class MeetingRepository implements MeetingInterface
|
|
{
|
|
public function findAll()
|
|
{
|
|
return Meeting::get();
|
|
}
|
|
|
|
public function getMeetingById($meetingId)
|
|
{
|
|
return Meeting::findOrFail($meetingId);
|
|
}
|
|
|
|
public function delete($meetingId)
|
|
{
|
|
Meeting::destroy($meetingId);
|
|
}
|
|
|
|
public function create(array $meetingDetails)
|
|
{
|
|
return Meeting::create($meetingDetails);
|
|
}
|
|
|
|
public function update($meetingId, array $newDetails)
|
|
{
|
|
return Meeting::whereId($meetingId)->update($newDetails);
|
|
}
|
|
|
|
}
|