@extends('layouts.master') @section('title') {{isset($activity) ? 'Edit activity': 'Add activity'}} @endsection @section('css') @endsection @section('page-header') @endsection @section('content')
@csrf
@if ($errors->has('type_id'))

{{$errors->first('type_id')}}

@endif
@if ($errors->has('category_id'))

{{$errors->first('category_id')}}

@endif
@if ($errors->has('title'))

{{$errors->first('title')}}

@endif
@if ($errors->has('overview'))

{{$errors->first('overview')}}

@endif
@if ($errors->has('description'))

{{$errors->first('description')}}

@endif
@if ($errors->has('difficulty'))

{{$errors->first('difficulty')}}

@endif
@if ($errors->has('duration'))

{{$errors->first('duration')}}

@endif
image Upload
@if (isset($activity))
{{$activity->title}}
@endif
@if ($errors->has('main_image'))

{{$errors->first('main_image')}}

@endif
@isset($activity)
Assign Exercise To ({{$activity->title}})
@csrf
@if ($errors->has('exercise_id'))

{{$errors->first('exercise_id')}}

@endif
@if ($errors->has('reps'))

{{$errors->first('reps')}}

@endif
@if ($errors->has('sets'))

{{$errors->first('sets')}}

@endif
@if ($errors->has('rest_between_sets'))

{{$errors->first('rest_between_sets')}}

@endif
@if ($errors->has('rest_between_exercises'))

{{$errors->first('rest_between_exercises')}}

@endif

Asseined Exercises

@foreach ($assigned_exercises as $assigned_exercise) @endforeach
# exercise reps sets rest between sets rest between exercises date Action
{{$i}} {{$assigned_exercise->exercise? $assigned_exercise->exercise->title: ''}} {{$assigned_exercise->reps}} {{$assigned_exercise->sets}} {{$assigned_exercise->rest_between_sets}} {{$assigned_exercise->rest_between_exercises}} {{date('d M Y', strtotime($assigned_exercise->created_at))}}
@endisset
@endsection @section('js') @endsection