StocksNew/Modules/Meeting/app/Repositories/MeetingRepository.php

36 lines
663 B
PHP
Raw Normal View History

2024-08-27 12:03:06 +00:00
<?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);
}
}