StocksNew/Modules/Admin/app/Repositories/DropdownRepository.php

35 lines
679 B
PHP
Raw Normal View History

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