@extends('layouts.master') @section('title',__('Manage Season')) @section('breadcum') @endsection @section('maincontent')
{{-- Impport Model Start --}} {{-- Import Model End --}} {{ __('Back') }}
{{__('Manage Season')}}
{{__('Of')}} {{$tv_series->title}} @if ($tv_series->tmdb == 'Y') {!!$tv_series->tmdb == 'Y' ? ' by tmdb' : ''!!} @endif
{!! Form::open(['method' => 'POST', 'action' => 'TvSeriesController@store_seasons', 'files' => true]) !!}
{!! Form::label('season_no', __('Season No.')) !!} {!! Form::number('season_no', null, ['class' => 'form-control', 'min' => '0']) !!} {{ $errors->first('season_no') }}
{!! Form::label('season_slug',__('Season Slug')) !!} {!! Form::text('season_slug', null, ['class' => 'form-control', 'min' => '0']) !!} {{ $errors->first('season_slug') }}
{!! Form::label('a_language', __('Audio Languages')) !!}

{!! Form::select('a_language[]', $a_lans, null, ['class' => 'form-control select2', 'multiple']) !!}
{{ $errors->first('a_language') }}
{!! Form::label('', __('Choose Custom Thumbnail And Poster')) !!}
{!! Form::label('thumbnail', __('Thumbnail')) !!} {!! Form::file('thumbnail', ['class' => 'input-file', 'id'=>'thumbnail']) !!}

{{__('Choose Custom Thumbnail')}}

{{ $errors->first('thumbnail') }}
{!! Form::label('poster',__('Poster')) !!} {!! Form::file('poster', ['class' => 'input-file', 'id'=>'poster']) !!}

{{__('Choose Custom Poster')}}

{{ $errors->first('poster') }}
{!! Form::label('is_protect', __('Protected Video?')) !!}
{{ $errors->first('is_protect') }}
{{ $errors->first('password') }} {{ Form::hidden('tv_series_id', $id) }}
{{__('Want IMDB Ratings And More Or Custom')}}?
{!! Form::label('actor_id', __('Actors')) !!} {!! Form::select('actor_id[]', $actor_ls, null, ['class' => 'form-control select2', 'multiple']) !!} {{ $errors->first('actor_id') }}
{!! Form::label('publish_year', __('Publish Year')) !!} {!! Form::number('publish_year', null, ['class' => 'form-control', 'min' => '0']) !!} {{ $errors->first('publish_year') }}
{!! Form::label('trailer_url',__('Trailer URL')) !!} {!! Form::text('trailer_url', null, ['class' => 'form-control','placeholder'=>__('Please Enter Trailer Url')]) !!} {{ $errors->first('trailer_url') }}
{!! Form::label('detail', __('Description')) !!} {!! Form::text('detail', null, ['class' => 'form-control']) !!} {{ $errors->first('detail') }}
{!! Form::close() !!}
@if(isset($seasons)) @foreach($seasons as $key => $season) @php $all_languages = App\AudioLanguage::all(); // get old audio language values $old_lans = collect(); $a_lans = collect(); if ($season->a_language != null){ $old_list = explode(',', $season->a_language); for ($i = 0; $i < count($old_list); $i++) { $old1 = App\AudioLanguage::find($old_list[$i]); if ( isset($old1) ) { $old_lans->push($old1); } } } $a_lans = $all_languages->diff($old_lans); @endphp
{!! Form::model($season, ['method' => 'PATCH', 'files' => true, 'action' => ['TvSeriesController@update_seasons', $season->id]]) !!}
{!! Form::label('season_no', __('Season No.')) !!} {!! Form::number('season_no', null, ['class' => 'form-control', 'min' => '0']) !!} {{ $errors->first('season_no') }}
{!! Form::label('season_slug',__('Season Slug')) !!} {!! Form::text('season_slug', null, ['class' => 'form-control', 'min' => '0']) !!} {{ $errors->first('season_slug') }}
{{ Form::hidden('tv_series_id', $id) }}
{!! Form::label('a_language', __('Audio Languages')) !!}
{{ $errors->first('a_language') }}
{!! Form::label('', __('Choose Custom Thumbnail And Poster')) !!}
{!! Form::label('thumbnail',__('Thumbnail')) !!} {!! Form::file('thumbnail', ['class' => 'input-file', 'id'=>'thumbnail'.$season->id]) !!}

{{__('Choose Custom Thumbnail')}}

{{ $errors->first('thumbnail') }}
{!! Form::label('poster', __('Poster')) !!} {!! Form::file('poster', ['class' => 'input-file', 'id'=>'poster'.$season->id]) !!}

{{__('Choose Custom Poster')}}

{{ $errors->first('poster') }}
{!! Form::label('is_protect', __('Protected Video?')) !!}
{{ $errors->first('is_protect') }}
{{ $errors->first('password') }}
{{__('Want IMDB Ratings And More Or Custom')}}?
tmdb == 'Y' ? 'checked' : ''}}/> tmdb != 'Y' ? 'checked' : ''}}/>
@php // get old actor list $actor_ls = App\Actor::all(); $old_actor = collect(); if ($season->actor_id != null){ $old_list = explode(',', $season->actor_id); for ($i = 0; $i < count($old_list); $i++) { $old3 = App\Actor::find(trim($old_list[$i])); if ( isset($old3) ) { $old_actor->push($old3); } } } $old_actor = $old_actor->filter(function($value, $key) { return $value != null; }); $actor_ls = $actor_ls->diff($old_actor); @endphp
{!! Form::label('actor_id', __('Actors')) !!}

{{ $errors->first('actor_id') }}
{!! Form::label('publish_year', __('Publish Year')) !!} {!! Form::number('publish_year', null, ['class' => 'form-control', 'min' => '0']) !!} {{ $errors->first('publish_year') }}
{!! Form::label('trailer_url',__('Traile rURL')) !!} {!! Form::text('trailer_url', null, ['class' => 'form-control','placeholder'=>__('Please Enter Trailer Url')]) !!} {{ $errors->first('trailer_url') }}
{!! Form::label('detail',__('Description')) !!} {!! Form::text('detail', null, ['class' => 'form-control']) !!} {{ $errors->first('detail') }}
{!! Form::close() !!}
@endforeach @endif
@if ($seasons) @foreach ($seasons as $key => $season) @endforeach @endif
{{__('Thumbnail')}} {{__('Season')}} {{__('Episodes')}} {{__('ByTMDB')}} {{__('Actions')}}
@if ($season->thumbnail != null) image @endif Season {{$season->season_no}} @if (isset($season->episodes) && count($season->episodes) > 0) {{count($season->episodes)}} episodes @else N/A @endif {!!$season->tmdb == 'Y' ? '' : '-'!!}
@can('tvseries.edit') @endcan @can('tvseries.view') @endcan @can('tvseries.delete') @endcan
@endsection @section('script') @endsection