@extends('admin.layouts.dashboard') @php $title = "Add Category"; $button_text = "Add Category"; if(!empty($category)) { $title = "Edit Category"; $button_text = "Update Category"; } @endphp @section('title', $title) @section('content') {{ $title }} @if(!empty($category)) @method('put') @else @endif @csrf @if(session()->has('failure')) {{ session()->get('failure') }} @endif @if(session()->has('success')) {{ session()->get('success') }} @endif @if(!empty($category)) @endif @error('name') {{ $message }} @enderror is_active)) @if($category->is_active == 1) checked @endif @endif> Active? {{ $button_text }} @endsection