@extends('layouts.main')

@section('title','Advanced - '.$category->name)

@section('body')

<div class="services-breadcrumb">
	<div class="inner_breadcrumb">
		<ul class="short_w3ls_agile">
			<li><a href="{{ url('/') }}">Home</a><span>|</span></li>
			<li><a href="{{ url('/categories') }}">Categories</a><span>|</span></li>
			<li>{{ $category->name }}</li>
		</ul>
	</div>
</div>

@include('flash::message')

<div class="banner_bottom">
	<div class="container">
		<div class="tittle_head">
			<h3 class="tittle">{{ $category->name }}</h3>
		</div>
		<div class="row">
			<div class="col-md-8">
				<div class="inner_sec_info_w3ls_agile">
					<div class="panel panel-default">
						<div class="panel-body">
							<div class="panel panel-default">
								<div class="panel-body">
									<div class="text-center">
										<img src="{{ asset('images/'.$category->image) }}" class="img-responsive">
									</div>
									<p class="text-center">{{ $category->description }}</p>
									<hr>
									<ul style="margin-left: 10px">
										@foreach(collect(explode("<br />",nl2br($category->job_titles))) as $jobTitle)
										<li>{{ $jobTitle }}</li>
										@endforeach
									</ul>
								</div>
							</div>
						</div>
					</div>

				</div>
			</div>
			<div class="inner_sec_info_w3ls_agile">
				<div class="col-md-4">
					<div class="panel panel-info">
						<div class="panel-heading"><h5 class="text-center">Other Categories</h5></div>
						<div class="panel-body">
							@foreach($categories as $relatedCategory)
							<h5>{{ $relatedCategory->name }}</h5>
							<p style="color:green">{{ $relatedCategory->shortDescription() }}</p>
							<p class="text-center"><a href="{{ url($relatedCategory->url()) }}" class="btn btn-info">Read More</a></p>
							<hr>
							@endforeach
							<p class="text-center"><a href="{{ url('/category') }}" class="btn btn-info">View All Categories</a></p>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>
</div>
@endsection