public function index()
{
$categories = Category::withCount('posts')->orderByDesc('posts_count')->get();
return view('blog.category-index', ['categories' => $categories]);
}
@if($category->posts_count === 0)
<a href="#" class="uk-icon-link" uk-icon="trash" onclick="deleteCategory({{ $category->id }}, '{{ $category->title }}');"></a>
<form action="{{ route('category.destroy', $category->id) }}" method="post" id="destroy-{{ $category->id }}">
@csrf
</form>
@endif
SSH доступа нет, на хостинге панель ISPmanager
use App\Http\Controllers\ContactController;
Route::post('/contact/submit', [ContactController::class, 'submit'])->name('contact-form');
Route::post('/contact/submit', [\App\Http\Controllers\ContactController::class, 'submit'])->name('contact-form');