StocksNew/Modules/Meeting/app/Repositories/MeetingRepository.php
Sampanna Rimal 53c0140f58 first commit
2024-08-27 17:48:06 +05:45

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);
}
}