@extends('projects.layout')
  
  
@section('content')
    <div class="container">
        <h2 class="text-center mt-5 mb-3">Создать новый проект</h2>
        <div class="card">
            <div class="card-header">
                <a class="btn btn-outline-info float-right" href="{{ route('projects.index') }}"> 
                    Просмотр всех проектов
                </a>
            </div>
            <div class="card-body">
                @if ($errors->any())
                    <div class="alert alert-danger">
                        <ul>
                            @foreach ($errors->all() as $error)
                                <li>{{ $error }}</li>
                            @endforeach
                        </ul>
                    </div>
                @endif
                <form action="{{ route('projects.store') }}" method="POST">
                    @csrf
                    <div class="form-group">
                        <label for="name">Название</label>
                        <input type="text" class="form-control" id="name" name="name">
                    </div>
                    <div class="form-group">
                        <label for="description">Описание</label>
                        <textarea class="form-control" id="description" rows="3" name="description"></textarea>
                    </div>
                   
                    <button type="submit" class="btn btn-outline-primary mt-3">Сохранить проект</button>
                </form>
                
            </div>
        </div>
    </div>
    
@endsection