@php if (empty($product)) { $product_id = ''; $product_code = ''; $product_name = ''; $product_price = ''; $product_weight = ''; $product_quantity = ''; $product_unit = ''; $product_type = ''; $product_description = ''; $product_min_stock_alert = ''; $product_max_request_per_order = ''; // $product_stock = ''; $product_status = ''; $product_image = ''; } else { $product_id = $product->product_id; $product_code = $product->product_code; $product_name = $product->product_name; $product_price = $product->product_price; $product_weight = $product->product_weight ?? ''; $product_quantity = $product->product_quantity; $product_unit = $product->product_unit; $product_type = $product->product_type; $product_description = $product->product_description; $product_min_stock_alert = $product->product_min_stock_alert; $product_max_request_per_order = $product->product_max_request_per_order; // $product_stock = $product->product_stock; $product_status = $product->product_status; $product_image = $product->product_image; } @endphp @extends('layouts.master') @section('title', 'Product Add/Edit') @section('style') @endsection @section('script') @endsection @section('content') @include('layouts.header') @include('layouts.title') @yield('title') @if ($errors->any()) @foreach ($errors->all() as $error) {{ $error }} @endforeach @endif @csrf Product Image @if (!empty($product_image)) Current Image: @endif Product Name* Product Code* Price (THB)* product_type ?? '') == '' ? 'selected' : '' }}> Please select* @foreach ($product_types as $i => $product_type) product_type ?? '') == $product_type->product_type_id) selected @endif> {{ $product_type->product_type_name }} @endforeach Product Type* Quantity* product_unit ?? '') == '' ? 'selected' : '' }}> Please select* @foreach ($units as $i => $unit) product_unit ?? '') == $unit->unit_id) selected @endif> {{ $unit->name }} @endforeach Unit* Min Stock Order* Max Request per Order* Weight(grams)* Active Inactive Status* {{ old('product_description', $product_description) }} Description Back * These fields are required. @include('layouts.footer') @endsection
Current Image: