@component('panel.layouts.component', ['title' => 'ثبت دسته جدید']) @slot('style') <style> .card-header { text-align: center !important; } .form-control { background-color: hsl(315, 22%, 86%); } .required { color: red; } .py-5 { padding-top: 0 !important; } </style> @endslot @slot('subject') <h1><i class="fa fa-users"></i> ثبت دسته جدید </h1> @endslot @slot('breadcrumb') <li class="breadcrumb-item">دسته بندی محصولات</li> @endslot @slot('content') <div class="auth-background h-auto py-5"> <div class="container py-5"> <div class="row align-items-center"> <div class="col-lg-12 col-md-12 mx-auto"> <div class="card"> <div class="card-header"><strong>{{ __('ثبت دسته بندی جدید') }}</strong></div> <div class="card-body mx-lg-5 px-lg-3"> <form method="POST" action="{{ route('categories.store') }}"> @csrf <div class="form-group"> <label for="title">{{ __('category.title') }}</label><i class="required"> *</i> <input id="title" type="text" class="form-control @error('title') is-invalid @enderror" name="title" value="{{ old('title') }}" autocomplete="title" autofocus> @error('title') <span class="invalid-feedback" role="alert"> <strong>{{ $message }}</strong> </span> @enderror </div> <div class="form-group"> <label for="slug">{{ __('category.slug') }}</label> <input id="slug" type="text" class="form-control @error('slug') is-invalid @enderror" name="slug" value="{{ old('slug') }}" autocomplete="slug" autofocus> @error('slug') <span class="invalid-feedback" role="alert"> <strong>{{ $message }}</strong> </span> @enderror </div> <div class="form-group"> <label for="parent">{{ __('category.parent') }}</label><i class="required"> *</i> <input id="parent" type="text" class="form-control @error('parent') is-invalid @enderror" name="parent" value="{{ old('parent') }}" autocomplete="parent" autofocus> @error('parent') <span class="invalid-feedback" role="alert"> <strong>{{ $message }}</strong> </span> @enderror </div> <div class="form-group"> <label for="category_type">{{ __('category.category_type') }}</label><i class="required"> *</i> <select id="category_type" type="text" class="form-control @error('category_type') is-invalid @enderror" name="category_type" autocomplete="category_type"> <option value="">انتخاب کنید</option> <option value="0" {{ (old('category_type') == '0') ? 'selected' : '' }}>محصولات</option> <option value="1" {{ (old('category_type') == '1') ? 'selected' : '' }}>اخبار</option> <option value="2" {{ (old('category_type') == '2') ? 'selected' : '' }}>مطالب</option> </select> @error('category_type') <span class="invalid-feedback" role="alert"> <strong>{{ $message }}</strong> </span> @enderror </div> <div class="form-group"> <label for="discription">{{ __('category.discription') }}</label><i class="required"> *</i> <textarea id="discription" type="text" class="form-control @error('discription') is-invalid @enderror" name="discription" autocomplete="discription">{{ old('discription') }}</textarea> @error('discription') <span class="invalid-feedback" role="alert"> <strong>{{ $message }}</strong> </span> @enderror </div> <div class="form-group mb-0"> <div class=""> <button type="submit" class="btn btn-primary"> {{ __('ثبت دسته بندی') }} </button> <a href={{ route('categories.index') }} type="button" class="btn btn-warning"> انصراف</a> </div> </div> </form> </div> <div class="card-footer"> </div> </div> </div> </div> </div> </div> @endslot @slot('script') @endslot @endcomponent