2024-06-15 16:38:54 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App\Repositories;
|
|
|
|
|
|
|
|
use App\Models\Economies;
|
2024-06-23 11:17:56 +00:00
|
|
|
use App\Repositories\EconomyInterface;
|
2024-06-15 16:38:54 +00:00
|
|
|
|
|
|
|
|
|
|
|
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);
|
|
|
|
}
|
|
|
|
}
|