@extends('layouts.master')

@section('content')

<div class="container" style="max-width: 700px;">
	<h3 style="font-weight: 800; margin-bottom: 5px;">تعديل الفنان</h3>
	<hr>
	<form method="POST" action="/artist/update/{{$artist->id}}">
		{{ method_field('PATCH') }}
		@csrf
		<div class="form-group">
			<label for="artist">اسم الفنان:</label>
			<input type="text" class="form-control" id="artist" name="artist" value="{{$artist->name}}">
			@if ($errors->has('artist'))
			<div class="alert alert-danger mt-1">{{ $errors->first('artist') }}</div>
			@endif
		</div>

		<div class="form-group" style="text-align: center;">
			<button type="submit" class="btn btn-primary btn-lg btn-block">تحديث</button>
		</div>
	</form>

	<form class="delete" method="post" action="/artist/delete/{{$artist->id}}?type=artist">
		{{ method_field('DELETE') }}
		@csrf
		<button type="submit" class="btn btn-danger btn-lg btn-block">حذف</button>
	</form>
</div>

@endsection
