| Total Complexity | 9 |
| Total Lines | 48 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 10 | class ProcessRepository implements ProcessRepositoryInterface |
||
| 11 | { |
||
| 12 | // Process Index |
||
| 13 | public function indexProcess() |
||
| 14 | { |
||
| 15 | $processes = config('adminetic.caching', true) |
||
| 16 | ? (Cache::has('processes') ? Cache::get('processes') : Cache::rememberForever('processes', function () { |
||
| 17 | return Process::orderBy('position')->get(); |
||
| 18 | })) |
||
| 19 | : Process::orderBy('position')->get(); |
||
| 20 | |||
| 21 | return compact('processes'); |
||
| 22 | } |
||
| 23 | |||
| 24 | // Process Create |
||
| 25 | public function createProcess() |
||
| 26 | { |
||
| 27 | // |
||
| 28 | } |
||
| 29 | |||
| 30 | // Process Store |
||
| 31 | public function storeProcess(ProcessRequest $request) |
||
| 32 | { |
||
| 33 | Process::create($request->validated()); |
||
| 34 | } |
||
| 35 | |||
| 36 | // Process Show |
||
| 37 | public function showProcess(Process $process) |
||
| 38 | { |
||
| 39 | return compact('process'); |
||
| 40 | } |
||
| 41 | |||
| 42 | // Process Edit |
||
| 43 | public function editProcess(Process $process) |
||
| 44 | { |
||
| 45 | return compact('process'); |
||
| 46 | } |
||
| 47 | |||
| 48 | // Process Update |
||
| 49 | public function updateProcess(ProcessRequest $request, Process $process) |
||
| 50 | { |
||
| 51 | $process->update($request->validated()); |
||
| 52 | } |
||
| 53 | |||
| 54 | // Process Destroy |
||
| 55 | public function destroyProcess(Process $process) |
||
| 58 | } |
||
| 59 | } |
||
| 60 |