insert.blade.php 1.1 KB

1234567891011121314151617181920212223242526272829303132333435
  1. @extends('layout')
  2. @section('title', "Добавить рецензию")
  3. @section('content')
  4. @if (session("message"))
  5. <div class="alert alert-success">
  6. {{ session("message") }}
  7. </div>
  8. @endif
  9. <h2>Добавить Рецензию к игре {{$game->name}}:</h2>
  10. <form method="POST" action="/public/games/reviews/insert" style="margin-left:20px">
  11. <input type="text" name="id" value="{{$game->id}} "style="visibility: hidden">
  12. @csrf
  13. <div>
  14. <label>Автор:</label>
  15. <select name="author">
  16. @foreach ($authors as $author) <option value="{{$author->id}}">{{$author->name}} {{$author->specialization->title}}</option> @endforeach
  17. </select>
  18. </div> <br>
  19. <label>Текст:</label><br>
  20. <textarea cols="40" rows="3" name="text">{{old('text')}}</textarea>
  21. @error('text') <div style="color: red">{{$message}}</div> @enderror
  22. <br><br>
  23. <div>
  24. <label>Звезды:</label>
  25. <input type="number" name="stars" value="{{old('stars')}}">
  26. @error('stars') <div style="color: red">{{$message}}</div> @enderror
  27. </div> <br>
  28. <button type="submit" name="button">Добавить</button>
  29. </form>
  30. @endsection