12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 |
- @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-primary" href="{{ route('projects.create') }}">
- Создать новый проект
- </a>
- </div>
- <div class="card-body">
-
- @if ($message = Session::get('success'))
- <div class="alert alert-success">
- <b>{{ $message }}</b>
- </div>
- @endif
-
-
- <table class="table table-bordered">
- <tr>
- <th>Название</th>
- <th>Описание</th>
- <th width="240px">Действие</th>
- </tr>
- @foreach ($projects as $project)
- <tr>
- <td>{{ $project->name }}</td>
- <td>{{ $project->description }}</td>
- <td>
- <form action="{{ route('projects.destroy',$project->id) }}" method="POST">
- <a
- class="btn btn-outline-info"
- href="{{ route('projects.show',$project->id) }}">
- Посмотреть
- </a>
- <a
- class="btn btn-outline-success"
- href="{{ route('projects.edit',$project->id) }}">
- Редактировать
- </a>
- @csrf
- @method('DELETE')
- <button type="submit" class="btn btn-outline-danger">Удалить</button>
- </form>
- </td>
- </tr>
- @endforeach
- </table>
- </div>
- </div>
- </div>
- @endsection
|