first change
This commit is contained in:
43
Modules/PMS/app/Repositories/KanbanColumnRepository.php
Normal file
43
Modules/PMS/app/Repositories/KanbanColumnRepository.php
Normal file
@@ -0,0 +1,43 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\PMS\Repositories;
|
||||
|
||||
use Modules\PMS\Models\KanbanColumn;
|
||||
|
||||
class KanbanColumnRepository implements KanbanColumnInterface
|
||||
{
|
||||
public function findAll()
|
||||
{
|
||||
return KanbanColumn::orderBy('position')->get();
|
||||
}
|
||||
|
||||
public function getKanbanColumnById($TaskCategoryId)
|
||||
{
|
||||
return KanbanColumn::findOrFail($TaskCategoryId);
|
||||
}
|
||||
|
||||
public function delete($TaskCategoryId)
|
||||
{
|
||||
KanbanColumn::destroy($TaskCategoryId);
|
||||
}
|
||||
|
||||
public function create($TaskCategoryDetails)
|
||||
{
|
||||
return KanbanColumn::create($TaskCategoryDetails);
|
||||
}
|
||||
|
||||
public function update($TaskCategoryId, array $newDetails)
|
||||
{
|
||||
return KanbanColumn::whereId($TaskCategoryId)->update($newDetails);
|
||||
}
|
||||
|
||||
public function pluck(callable $query = null)
|
||||
{
|
||||
$baseQuery = KanbanColumn::query();
|
||||
if (is_callable($query)) {
|
||||
$query($baseQuery);
|
||||
}
|
||||
|
||||
return $baseQuery->pluck('name', 'id')->all();
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user