HEX
Server: Apache/2.4.41 (Ubuntu)
System: Linux ip-172-31-42-149 5.15.0-1084-aws #91~20.04.1-Ubuntu SMP Fri May 2 07:00:04 UTC 2025 aarch64
User: ubuntu (1000)
PHP: 7.4.33
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: /var/www/vhost/disk-apps/comfama.sports-crowd.com/resources/views/players/form.blade.php
@csrf
<div class="card-body">
    <div class="form-row">

        <div class="row">
            <div class="col-xs-4 col-sm-4 col-md-4 col-lg-4"></div>
            <div class="col-xs-4 col-sm-4 col-md-4 col-lg-4">
                @if($player && $player->image)
                <img class="media-object media-object-big" src="{{ config('filesystems.disks.s3.url') }}/players/{{$player->image}}" alt="{{$player->image}}">
                @endif
            </div>
            <div class="col-xs-4 col-sm-4 col-md-4 col-lg-4"></div>
        </div>

        <input type="hidden" class="form-control" name="image" placeholder="" value="{{ $player->image ?? old('image') }}">

        <div class="form-group col-md-12">
            <label for="name" class="ul-form__label">@lang('messages.players.title_3'):</label>
            <input type="text" class="form-control" id="name" name="name" placeholder="Cristiano Ronaldo" value="{{ $player->name ?? old('name') }}" required>
        </div>
        <div class="col-12 col-md-12">
            <div class="form-group">
                <label for="image">{{ Lang::get('messages.players.title_4')}} </label>
                <input type="file" id="image" name="image">
            </div>
        </div>
        <div class="form-group col-md-12">
            <label for="number" class="ul-form__label">@lang('messages.players.title_5'):</label>
            <input type="number" class="form-control color-picker campoNumber" id="number" min="0" max="100" pattern="^[0-9]+" name="number" placeholder="Dorsal" value="{{ $player->number ?? old('number') }}" required>
        </div>
        <div class="form-group col-md-12">
            <label for="age" class="ul-form__label">@lang('messages.players.title_6'):</label>
            <input type="number" class="form-control color-picker campoNumber" id="age" min="0" max="100" pattern="^[0-9]+" name="age" placeholder="21" value="{{ $player->age ?? old('age') }}" required>
        </div>
        {{-- <div class="form-group col-md-12">
            <label for="country" class="ul-form__label">@lang('messages.players.title_7'):</label>
            <input type="text" class="form-control color-picker" id="country" name="country" placeholder="Colombia"
                value="{{ $player->country ?? old('country') }}" required>
    </div> --}}
    <div class="form-group col-md-12">
        <label for="country_id" class="ul-form__label">@lang('messages.players.title_7'):</label>
        <select class="form-control" name="country_id" id="country_id" value="{{ $player->country_id ?? old('country_id') }}" required>
            <option value="" selected></option>
            @forelse ($countries as $country)
            @if($country->id == old('stage_id'))
            <option value="{{ $country->id }}" selected>
                {{ $country->name }}
            </option>
            @endif
            <option value="{{ $country->id }}" {{ isset($player) && $player->country_id == $country->id ? 'selected' : '' }}>
                {{ $country->name }}
            </option>
            @empty
            <option value="0" disabled>Sin Opciones</option>
            @endforelse
        </select>
    </div>
    <div class="form-group col-md-12">
        <label for="date_of_birth" class="ul-form__label">@lang('messages.players.title_8'):</label>
        <input type="date" class="form-control" id="date_of_birth" name="date_of_birth" placeholder="" value="{{  isset($player) ? str_replace(" ", "T", $player->date_of_birth) : old('date_of_birth') }}" required>
    </div>
    <div class="form-group col-md-12">
        <label for="biography" class="ul-form__label">@lang('messages.players.title_9'):</label>
        <input type="text" class="form-control color-picker" id="biography" name="biography" placeholder="Biografía del jugador" value="{{ $player->biography ?? old('biography') }}">
    </div>
    <div class="form-group col-md-12">
        <label for="joined" class="ul-form__label">@lang('messages.players.title_10'):</label>
        <input type="date" class="form-control" id="joined" name="joined" placeholder="" value="{{  isset($player) ? str_replace(" ", "T", $player->joined) : old('joined') }}">
    </div>
    <div class="form-group col-md-12">
        <label for="date_of_debut" class="ul-form__label">@lang('messages.players.title_11'):</label>
        <input type="date" class="form-control" id="date_of_debut" name="date_of_debut" placeholder="" value="{{  isset($player) ? str_replace(" ", "T", $player->date_of_debut) : old('date_of_debut') }}">
    </div>
    <div class="form-group col-md-12">
        <label for="rival_team_debut" class="ul-form__label">@lang('messages.players.title_12'):</label>
        <input type="text" class="form-control color-picker" id="rival_team_debut" name="rival_team_debut" placeholder="Barcelona" value="{{ $player->rival_team_debut ?? old('rival_team_debut') }}">
    </div>
    <div class="form-group col-md-12">
        <label for="retirement" class="ul-form__label">@lang('messages.players.title_13'):</label>
        <input type="text" class="form-control color-picker" id="retirement" name="retirement" placeholder="" value="{{ $player->retirement ?? old('retirement') }}">
    </div>
    <div class="col-12 col-md-12">
        <div class="form-group">
            <label for="achievements" class="ul-form__label">@lang('messages.players.title_14'):
            </label>
            <select class="form-control select2 col-12 col-md-12" multiple="multiple" name="achievements" id="achievements">
                @if (isset($player->achievements))
                @foreach (explode(',', $player->achievements ) as $item)
                <option value="{{ $item }}" selected>{{ $item }}</option>
                @endforeach
                @endif
            </select>
            <small class="form-text text-muted">
                Liga Colombiana, Copa Libertadores, etc.
            </small>
        </div>
    </div>
    <!-- <div class="form-group col-md-12">
            <label for="achievements" class="ul-form__label">@lang('messages.players.title_14'):</label>
            <input type="text" class="form-control color-picker" id="achievements" name="achievements" placeholder="Liga Colombiana, Copa Libertadores, etc."
                value="{{ $player->achievements ?? old('achievements') }}" >
        </div> -->
    <div class="form-group col-md-12">
        <label for="height" class="ul-form__label">@lang('messages.players.title_15') (cm):</label>
        <input type="number" class="form-control color-picker campoNumber" id="height" min="0" max="250" pattern="^[0-9]+" name="height" placeholder="180cm" value="{{ $player->height ?? old('height') }}" required>
    </div>
    <div class="form-group col-md-12">
        <label for="honors" class="ul-form__label">@lang('messages.players.title_16'):</label>
        <input type="number" class="form-control color-picker campoNumber" id="honors" min="0" max="100" pattern="^[0-9]+" name="honors" placeholder="Número de logros" value="{{ $player->honors ?? old('honors') }}">
    </div>
    <div class="form-group col-md-12">
        <label for="instagram" class="ul-form__label">@lang('messages.players.title_29'):</label>
        <input type="text" class="form-control color-picker" id="instagram" name="instagram" placeholder="https://www.instagram.com/cristiano" value="{{ $player->instagram ?? old('instagram') }}">
    </div>
    <div class="form-group col-md-12">
        <label for="equipment_categories_id" class="ul-form__label">@lang('messages.players.title_17'):</label>
        <select class="form-control" name="position_id" id="position_id" value="{{ $player->position_id ?? old('position_id') }}" required>
            <option value="" selected></option>
            @forelse ($positions as $position)
            @if($position->id == old('stage_id'))
            <option value="{{ $position->id }}" selected>
                {{ $position->name }}
            </option>
            @endif
            <option value="{{ $position->id }}" {{ isset($player) && $player->position_id == $position->id ? 'selected' : '' }}>
                {{ $position->name }}
            </option>
            @empty
            <option value="0" disabled>Sin Opciones</option>
            @endforelse
        </select>
    </div>
    <div class="form-group col-md-12">
        <label for="position_id" class="ul-form__label">@lang('messages.players.title_18'):</label>
        <select class="form-control" name="equipment_categories_id" id="equipment_categories_id" value="{{ $player->equipment_categories_id ?? old('equipment_categories_ids') }}" required>
            <option value="" selected></option>
            @forelse ($equipmentCategories as $equipmentCategory)
            @if($equipmentCategory->id == old('stage_id'))
            <option value="{{ $equipmentCategory->id }}" selected>
                {{ $equipmentCategory->name }}
            </option>
            @endif
            <option value="{{ $equipmentCategory->id }}" {{ isset($player) && $player->equipment_categories_id == $equipmentCategory->id ? 'selected' : '' }}>
                {{ $equipmentCategory->name }}
            </option>
            @empty
            <option value="0" disabled>Sin Opciones</option>
            @endforelse
        </select>
    </div>
    <div class="form-group col-md-12">
        <label for="inactive" class="ul-form__label">Inactivar:</label>
        <div class="checkbox checbox-switch switch-success">
            <label> No
                <input type="checkbox" {{ (isset($player) && $player->inactive === 1 ? 'checked' : '')  }} class="form-control" id="inactive" name="inactive" />
                <span></span>
                Si
            </label>
        </div>

        {{-- <div class="checkbox checbox-switch switch-success">
                <label> No
                    <input type="checkbox" class="form-control" id="chkSucursalProducts"
                        name="chkSucursalProducts" checked="" />
                    <span></span>Si
                </label>
            </div> --}}
    </div>
</div>
</div>

<script type="text/javascript">
    $(document).ready(function() {

        $(".select2").select2({
            language: "es",
            selectOnClose: false,
            tags: true,
            tokenSeparators: [","],
        });

    });
</script>