Heera/Modules/Admin/app/Repositories/DropdownRepository.php
2024-05-16 09:31:08 +05:45

35 lines
679 B
PHP

<?php
namespace Modules\Admin\Repositories;
use Modules\Admin\Models\Dropdown;
class DropdownRepository implements DropdownInterface
{
public function findAll()
{
return Dropdown::get();
}
public function getDropdownById($DropdownId)
{
return Dropdown::findOrFail($DropdownId);
}
public function delete($DropdownId)
{
Dropdown::destroy($DropdownId);
}
public function create(array $DropdownDetails)
{
return Dropdown::create($DropdownDetails);
}
public function update($DropdownId, array $newDetails)
{
return Dropdown::where('id', $DropdownId)->update($newDetails);
}
}