35 lines
679 B
PHP
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);
|
|
}
|
|
|
|
}
|