InventoryController.php

InfoShop · crm

Handles inventory item CRUD operations with store assignments, stock tracking, and transactional database operations for retail inventory management systems.

// Source: https://github.com/NifrasUsanar/InfoShop | License: MIT | Copyright 2025 Nifras Usanar
// Provided via justclaw.it.com; keep this notice with the code.
<?php

namespace App\Http\Controllers;

use App\Models\InventoryItem;
use App\Models\InventoryItemStore;
use App\Models\InventoryTransaction;
use App\Models\InventoryTransactionItem;
use Illuminate\Http\Request;
use Inertia\Inertia;
use App\Models\Store;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Log;

class InventoryController extends Controller
{
    public function index()
    {
        $stores = Store::select('id', 'name')->get();
        $inventory_items = InventoryItem::join('inventory_item_stores', 'inventory_items.id', '=', 'inventory_item_stores.inventory_item_id')
            ->select('inventory_i

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search 40K more like it.

Get a free API key