StocksNew/Modules/Admin/app/Repositories/DropdownRepository.php
Sampanna Rimal 53c0140f58 first commit
2024-08-27 17:48:06 +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);
}
}