@extends('backend.layouts.app') @section('title') {{ __($module_title) }} @endsection @push('after-styles') @endpush @section('content')
{{ html()->form('POST', route('backend.subscriptions.store')) ->attribute('enctype', 'multipart/form-data') ->attribute('data-toggle', 'validator') // Enable custom validator ->attribute('id', 'form-submit') // Form id to target in JS ->class('requires-validation') // Validation class for Bootstrap Validator ->attribute('novalidate', 'novalidate') // Prevent browser validation ->open() }} @csrf
{{ html()->label(__('frontend.admin') . ' *', 'user_id')->class('form-label') }} {{ html()->select('user_id', $users->pluck('full_name', 'id')->prepend(__('frontend.select_user'), '')) ->class('form-control select2') ->id('user_id') ->required() }} @error('user_id') {{ $message }} @enderror
User field is required
{{ html()->label(__('frontend.plans') . ' *', 'plan_id')->class('form-label') }} {!! html()->select('plan_id') ->class('form-control select2') ->id('plan_id') ->required() ->html( collect($plans)->map(function ($plan) use ($fixedTax, $percentageTax) { $planAmount = $plan->discount ? $plan->total_price : $plan->price; $selected = old('plan_id') == $plan->id ? 'selected' : ''; return ""; })->prepend('')->implode('') ) !!}
Plan field is required
{{ html()->label(__('frontend.amount'), 'amount')->class('form-label') }}
{{ html()->label(__('frontend.payment_date') . ' *', 'payment_date')->class('form-label') }} {{ html()->date('payment_date') ->value(old('payment_date', \Carbon\Carbon::now()->format('Y-m-d'))) ->class('form-control') ->id('payment_date') ->attribute('max', \Carbon\Carbon::now()->format('Y-m-d')) ->required() }} @error('payment_date') {{ $message }} @enderror
{{ html()->submit(__('frontend.submit'))->class('btn btn-primary')->id('submit-button') }}
{{ html()->form()->close() }}
@include('components.media-modal') @endsection @push('after-scripts') @endpush