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

36 lines
629 B
PHP

<?php
namespace Modules\Admin\Repositories;
use Modules\Admin\Models\Caste;
class CasteRepository implements CasteInterface
{
public function findAll()
{
return Caste::get();
}
public function getCasteById($casteId)
{
return Caste::findOrFail($casteId);
}
public function delete($casteId)
{
Caste::destroy($casteId);
}
public function create(array $casteDetails)
{
return Caste::create($casteDetails);
}
public function update($casteId, array $newDetails)
{
return Caste::where('id', $casteId)->update($newDetails);
}
}