@extends('layouts.app')

@section('title','Add Company')

@section('content')
<div class="row">
    <div class="col-md-12">
        <div class="panel panel-default">
            <div class="panel-heading">Add a new Company</div>
            <div class="panel-body">
                @include('errors.form')
                <form enctype="multipart/form-data" method="POST" action="{{ url('/admin/company/add') }}">
                    {{ csrf_field() }}
                    <input type="hidden" name="_method" value="PUT">
                    <div class="form-group">
                        <label>Company Name</label>
                        <input type="text" name="name" class="form-control" required>
                    </div>
                    <div class="form-group">
                        <label>Company Website</label>
                        <input type="url" name="website" class="form-control" value="http://" placeholder="URL must begin with http:// or https://">
                    </div>
                    <div class="form-group">
                        <label>Country</label>
                        <select name="country" class="form-control">
                            @foreach($countries as $country)
                            <option value="{{ $country->id }}">{{ $country->name }}</option>
                            @endforeach
                        </select>
                    </div>
                    <div class="form-group">
                        <label>Company Logo</label>
                        <input type="file" name="image" class="btn btn-info" required>
                    </div>
                    <input type="submit" name="submit" value="Add Company" class="btn btn-success">
                </form>
            </div>
        </div>
    </div>
</div>
@endsection
