| Total Complexity | 6 |
| Total Lines | 44 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 12 | class ColorController extends Controller |
||
| 13 | { |
||
| 14 | public function index(): View |
||
| 15 | { |
||
| 16 | $colors = Color::all(); |
||
| 17 | |||
| 18 | return view('master::colors.index', compact('colors')); |
||
| 19 | } |
||
| 20 | |||
| 21 | public function create(): View |
||
| 22 | { |
||
| 23 | return view('master::colors.create'); |
||
| 24 | } |
||
| 25 | |||
| 26 | public function store(ColorStoreRequest $request): RedirectResponse |
||
| 27 | { |
||
| 28 | Color::create($request->all()); |
||
| 29 | |||
| 30 | return redirect() |
||
| 31 | ->route('colors.index') |
||
| 32 | ->with('success', 'Color was saved'); |
||
| 33 | } |
||
| 34 | |||
| 35 | public function edit(Color $color) |
||
| 36 | { |
||
| 37 | return view('master::colors.create', compact('color')); |
||
| 38 | } |
||
| 39 | |||
| 40 | public function update(ColorUpdateRequest $request, Color $color): RedirectResponse |
||
| 47 | } |
||
| 48 | |||
| 49 | public function destroy(Color $color) |
||
| 50 | { |
||
| 56 | } |
||
| 57 | } |
||
| 58 |