added company company type into admin module
This commit is contained in:
35
Modules/Admin/app/Repositories/WarningRepository.php
Normal file
35
Modules/Admin/app/Repositories/WarningRepository.php
Normal file
@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Admin\Repositories;
|
||||
|
||||
use Modules\Admin\Models\Warning;
|
||||
|
||||
|
||||
class WarningRepository implements WarningInterface
|
||||
{
|
||||
public function findAll()
|
||||
{
|
||||
return Warning::get();
|
||||
}
|
||||
|
||||
public function getWarningById($warningId)
|
||||
{
|
||||
return Warning::findOrFail($warningId);
|
||||
}
|
||||
|
||||
public function delete($warningId)
|
||||
{
|
||||
Warning::destroy($warningId);
|
||||
}
|
||||
|
||||
public function create(array $warningDetails)
|
||||
{
|
||||
return Warning::create($warningDetails);
|
||||
}
|
||||
|
||||
public function update($warningId, array $newDetails)
|
||||
{
|
||||
return Warning::where('warning_id', $warningId)->update($newDetails);
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user