mirror of
https://github.com/Bigherollc/wticreatorstudio.git
synced 2026-07-14 00:02:05 -04:00
35 lines
599 B
PHP
35 lines
599 B
PHP
<?php
|
|
|
|
namespace Modules\Setup\Repositories;
|
|
|
|
use Modules\Setup\Entities\Department;
|
|
|
|
|
|
class DepartmentRepository
|
|
{
|
|
public function all()
|
|
{
|
|
return Department::latest()->get();
|
|
}
|
|
|
|
public function create(array $data)
|
|
{
|
|
return Department::create($data);
|
|
}
|
|
|
|
public function find($id)
|
|
{
|
|
return Department::findOrFail($id);
|
|
}
|
|
|
|
public function update(array $data, $id)
|
|
{
|
|
return Department::findOrFail($id)->update($data);
|
|
}
|
|
|
|
public function delete($id)
|
|
{
|
|
return Department::findOrFail($id)->delete();
|
|
}
|
|
}
|