65 lines
3 KiB
PHP
65 lines
3 KiB
PHP
|
@extends('manage.layout')
|
||
|
|
||
|
@section('content')
|
||
|
<h1>Add Movie</h1>
|
||
|
<hr/>
|
||
|
<form action="{{ route('manage.movies') }}" method="POST" enctype="multipart/form-data" class="form">
|
||
|
@csrf
|
||
|
<div class="form-group @error('movie_name') error @enderror">
|
||
|
<label for="movie_name">Name:</label>
|
||
|
<input type="text" name="movie_name" id="movie_name" value="{{ old('movie_name') }}">
|
||
|
@error('movie_name')
|
||
|
<span class="error-message">{{ $message }}</span>
|
||
|
@enderror
|
||
|
</div>
|
||
|
<div class="form-group @error('movie_description') error @enderror">
|
||
|
<label for="movie_description">Description:</label>
|
||
|
<textarea name="movie_description" id="movie_description" cols="30"
|
||
|
rows="10">{{ old('movie_description') }}</textarea>
|
||
|
@error('movie_description')
|
||
|
<span class="error-message">{{ $message }}</span>
|
||
|
@enderror
|
||
|
</div>
|
||
|
<div class="form-group @error('movie_image') error @enderror">
|
||
|
<label for="movie_image">Image URL:</label>
|
||
|
<input type="text" name="movie_image" id="movie_image" value="{{ old('movie_image') }}">
|
||
|
@error('movie_image')
|
||
|
<span class="error-message">{{ $message }}</span>
|
||
|
@enderror
|
||
|
</div>
|
||
|
<div class="form-group @error('movie_length') error @enderror">
|
||
|
<label for="movie_length">Length:</label>
|
||
|
<input type="number" name="movie_length" id="movie_length" value="{{ old('movie_length') }}">
|
||
|
@error('movie_length')
|
||
|
<span class="error-message">{{ $message }}</span>
|
||
|
@enderror
|
||
|
</div>
|
||
|
<div class="form-group @error('movie_year') error @enderror">
|
||
|
<label for="movie_year">Year:</label>
|
||
|
<input type="number" name="movie_year" id="movie_year" value="{{ old('movie_year') }}">
|
||
|
@error('movie_year')
|
||
|
<span class="error-message">{{ $message }}</span>
|
||
|
@enderror
|
||
|
</div>
|
||
|
<div class="form-group @error('movie_age_limit') error @enderror">
|
||
|
<label for="movie_age_limit">Age Limit:</label>
|
||
|
<input type="number" name="movie_age_limit" id="movie_age_limit" value="{{ old('movie_age_limit') }}">
|
||
|
@error('movie_age_limit')
|
||
|
<span class="error-message">{{ $message }}</span>
|
||
|
@enderror
|
||
|
</div>
|
||
|
<div class="form-group @error('genre_id') error @enderror">
|
||
|
<label for="genre_id">Genre:</label>
|
||
|
<select name="genre_id" id="genre_id">
|
||
|
@foreach($genres as $genre)
|
||
|
<option value="{{ $genre->genre_id }}">{{ $genre->genre_name }}</option>
|
||
|
@endforeach
|
||
|
</select>
|
||
|
@error('genre_id')
|
||
|
<span class="error-message">{{ $message }}</span>
|
||
|
@enderror
|
||
|
</div>
|
||
|
<button type="submit" class="button">Add Movie</button>
|
||
|
</form>
|
||
|
@endsection
|