<?php

use App\Http\Controllers\CartController;
use Illuminate\Support\Facades\Route;

Route::get('/cart',         [CartController::class, 'index'])->middleware('permission:cart,view');
Route::post('/cart',        [CartController::class, 'store'])->middleware('permission:cart,add');

Route::get('/cart/me',      [CartController::class, 'myCarts']);
Route::post('/cart/me',     [CartController::class, 'storeMine']);
Route::get('/cart/{id}',    [CartController::class, 'show'])->middleware('permission:cart,view');
Route::put('/cart/{id}',    [CartController::class, 'update'])->middleware('permission:cart,edit');
Route::delete('/cart/{id}', [CartController::class, 'destroy'])->middleware('permission:cart,delete');
