35 lines
692 B
PHP
35 lines
692 B
PHP
<?php
|
|
|
|
namespace App\Repositories;
|
|
|
|
use App\Models\Economies;
|
|
use App\Repositories\EconomyInterface;
|
|
|
|
|
|
class EconomyRepository implements EconomyInterface
|
|
{
|
|
public function getAll()
|
|
{
|
|
return Economies::where('status','<>', -1)->orderBy('display_order')->get();
|
|
}
|
|
|
|
public function getId($id)
|
|
{
|
|
return Economies::findOrFail($id);
|
|
}
|
|
|
|
public function delete($id)
|
|
{
|
|
return Economies::destroy($id);
|
|
}
|
|
|
|
public function create(array $Details)
|
|
{
|
|
return Economies::create($Details);
|
|
}
|
|
|
|
public function update($id, array $newDetails){
|
|
return Economies::where('economy_id', $id)->update($newDetails);
|
|
}
|
|
}
|