2026-03-18 11:40:20 +02:00
< x - app - layout >
< x - slot name = "header" >
< h2 class = "font-semibold text-xl text-gray-800 leading-tight" >
{{ __ ( 'Edit Website' ) }} : {{ $website -> name }}
</ h2 >
</ x - slot >
< div class = "py-12" >
< div class = "max-w-2xl mx-auto sm:px-6 lg:px-8" >
2026-03-19 18:42:19 +02:00
< div class = "bg-white overflow-hidden rounded-xl border border-gray-200" >
2026-03-18 11:40:20 +02:00
< div class = "p-6" >
< form method = "POST" action = "{{ route('websites.update', $website ) }}" >
@ csrf
@ method ( 'PUT' )
< div class = "mb-6" >
< x - input - label for = "name" : value = "__('Website Name')" />
< x - text - input id = "name" name = "name" type = "text" class = "mt-1 block w-full" : value = "old('name', $website->name )" required autofocus />
< x - input - error class = "mt-2" : messages = " $errors->get ('name')" />
</ div >
< div class = "mb-6" >
< x - input - label for = "domain" : value = "__('Domain')" />
< x - text - input id = "domain" name = "domain" type = "text" class = "mt-1 block w-full" : value = "old('domain', $website->domain )" required />
2026-03-25 20:39:10 +02:00
< p class = "mt-1 text-sm text-gray-500" > {{ __ ( 'Enter your domain in any format (e.g., example.com, www.example.com, https://example.com)' ) }} </ p >
2026-03-18 11:40:20 +02:00
< x - input - error class = "mt-2" : messages = " $errors->get ('domain')" />
</ div >
< div class = "mb-6" >
< label for = "is_active" class = "inline-flex items-center" >
< input id = "is_active" type = "checkbox" name = "is_active" value = "1" class = "rounded border-gray-300 text-indigo-600 shadow-sm focus:ring-indigo-500" {{ old ( 'is_active' , $website -> is_active ) ? 'checked' : '' }} >
< span class = "ms-2 text-sm text-gray-600" > {{ __ ( 'Active' ) }} </ span >
</ label >
</ div >
< div class = "flex items-center gap-4" >
2026-03-19 18:42:19 +02:00
< button type = "submit" class = "bg-indigo-600 rounded-lg px-4 py-2 text-white hover:bg-indigo-500 transition" >
{{ __ ( 'Save Changes' ) }}
</ button >
2026-03-18 12:18:07 +02:00
< a href = "{{ route('dashboard.show', $website ) }}" class = "text-sm text-gray-600 hover:text-gray-900" > {{ __ ( 'Cancel' ) }} </ a >
2026-03-18 11:40:20 +02:00
</ div >
</ form >
</ div >
</ div >
2026-03-19 18:42:19 +02:00
< div class = "mt-6 bg-red-50 overflow-hidden rounded-xl border border-red-200" >
2026-03-18 11:40:20 +02:00
< div class = "p-6" >
< h3 class = "text-lg font-medium text-red-600 mb-4" > {{ __ ( 'Danger Zone' ) }} </ h3 >
< p class = "text-sm text-gray-600 mb-4" > {{ __ ( 'Deleting a website will permanently remove all its analytics data. This action cannot be undone.' ) }} </ p >
< form method = "POST" action = "{{ route('websites.destroy', $website ) }}" onsubmit = "return confirm('Are you sure you want to delete this website and all its data?');" >
@ csrf
@ method ( 'DELETE' )
< x - danger - button > {{ __ ( 'Delete Website' ) }} </ x - danger - button >
</ form >
</ div >
</ div >
</ div >
</ div >
</ x - app - layout >