first commit
This commit is contained in:
34
Modules/Admin/app/Repositories/DropdownRepository.php
Normal file
34
Modules/Admin/app/Repositories/DropdownRepository.php
Normal file
@ -0,0 +1,34 @@
|
||||
<?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);
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user