updatea
This commit is contained in:
33
app/Repositories/TeamsRepository.php
Normal file
33
app/Repositories/TeamsRepository.php
Normal file
@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
namespace App\Repositories;
|
||||
|
||||
use App\Models\Teams;
|
||||
use App\Repositories\Interface\TeamsInterface;
|
||||
|
||||
class TeamsRepository implements TeamsInterface
|
||||
{
|
||||
public function getAll()
|
||||
{
|
||||
return Teams::where('status','<>', -1)->orderBy('display_order')->get();
|
||||
}
|
||||
|
||||
public function getTeamById($teamId)
|
||||
{
|
||||
return Teams::findOrFail($teamId);
|
||||
}
|
||||
|
||||
public function delete($teamId)
|
||||
{
|
||||
return Teams::destroy($teamId);
|
||||
}
|
||||
|
||||
public function create(array $provinceDetails)
|
||||
{
|
||||
return Teams::create($provinceDetails);
|
||||
}
|
||||
|
||||
public function update($teamId, array $newDetails){
|
||||
return Teams::where('team_id', $teamId)->update($newDetails);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user