cineflex/resources/views/manage/movies/movie.blade.php

60 lines
2.5 KiB
PHP

@extends('manage.layout')
@section('content')
<br/>
<div class="spread-h">
<h1>Edit Movie: {{ $movie->movie_name }}</h1>
<form action="{{ route('manage.movie', $movie->movie_id) }}" method="POST">
@csrf
@method('DELETE')
<button type="submit" class="button" style="height: 2rem; margin: 0.5rem 0;">Delete Movie</button>
</form>
</div>
<hr/>
{{-- PUT Form with values: Name, Description, Image, Length, Year, Age Limit--}}
<form action="{{ route('manage.movie', $movie->movie_id) }}" method="POST" enctype="multipart/form-data" class="form">
@csrf
@method('PUT')
<div class="form-group">
<label for="movie_name">Name:</label>
<input type="text" name="movie_name" id="movie_name" value="{{ $movie->movie_name }}">
</div>
<div class="form-group">
<label for="movie_description">Description:</label>
<textarea name="movie_description" id="movie_description" cols="30"
rows="10">{{ $movie->movie_description }}</textarea>
</div>
<div class="form-group">
<label for="movie_image">Image URL:</label>
<input type="text" name="movie_image" id="movie_image" value="{{ $movie->movie_image }}">
</div>
<div class="form-group">
<label for="movie_length">Length:</label>
<input type="number" name="movie_length" id="movie_length" value="{{ $movie->movie_length }}">
</div>
<div class="form-group">
<label for="movie_year">Year:</label>
<input type="number" name="movie_year" id="movie_year" value="{{ $movie->movie_year }}">
</div>
<div class="form-group">
<label for="movie_age_limit">Age Limit:</label>
<input type="number" name="movie_age_limit" id="movie_age_limit" value="{{ $movie->movie_age_limit }}">
</div>
<div class="form-group">
<button type="submit" class="button">Update Movie</button>
</div>
</form>
<hr/>
<h2>Movie Showings:</h2>
<ul class="numbered" style="margin-left: 1.2rem;">
@foreach($showings as $showing)
<li>
{{-- TODO: placeholder--}}
<a href="{{ route('manage', $showing->showing_id) }}">
{{ $showing->room->room_name }} - {{ $showing->showing_start }}
</a>
</li>
@endforeach
</ul>
@endsection