<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <title></title>
  <link
    href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css"
    rel="stylesheet"
  >
</head>

<body>
  <div class="container mt-2">
    <div class="row">
      <div class="col-lg-12 margin-tb">
        <div class="pull-left mb-2">
          <h2>Add Company</h2>
        </div>
        <div class="pull-right">
          <a
            class="btn btn-primary"
            href="{{ route('companies.index') }}"
          >
            Back</a>
        </div>
      </div>
    </div>
    @if (session('status'))
      <div class="alert alert-success mb-1 mt-1">
        {{ session('status') }}
      </div>
    @endif
    <form
      action="{{ route('companies.store') }}"
      method="POST"
      enctype="multipart/form-data"
    >
      @csrf
      <div class="row">
        <div class="col-xs-12 col-sm-12 col-md-12">
          <div class="form-group">
            <strong>Company Name:</strong>
            <input
              class="form-control"
              name="name"
              type="text"
              placeholder="Company Name"
            >
            @error('name')
              <div class="alert alert-danger mb-1 mt-1">{{ $message }}</div>
            @enderror
          </div>
        </div>
        <div class="col-xs-12 col-sm-12 col-md-12">
          <div class="form-group">
            <strong>Company Email:</strong>
            <input
              class="form-control"
              name="email"
              type="email"
              placeholder="Company Email"
            >
            @error('email')
              <div class="alert alert-danger mb-1 mt-1">{{ $message }}</div>
            @enderror
          </div>
        </div>
        <div class="col-xs-12 col-sm-12 col-md-12">
          <div class="form-group">
            <strong>Company Address:</strong>
            <input
              class="form-control"
              name="address"
              type="text"
              placeholder="Company Address"
            >
            @error('address')
              <div class="alert alert-danger mb-1 mt-1">{{ $message }}</div>
            @enderror
          </div>
        </div>
        <button
          class="btn btn-primary ml-3"
          type="submit"
        >Submit</button>
      </div>
    </form>
  </div>
</body>

</html>
