index.blade.php 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. @extends('master')
  2. @section('content')
  3. <div class="container" style = "margin-left:0px;width:100%;">
  4. <!-- меню !-->
  5. <nav class="navbar navbar-default">
  6. <div class="container-fluid">
  7. <div class="navbar-header">
  8. <div class="navbar-brand" style = "color:#144d8a;font-weight:600;">Choose hashteg:</div>
  9. </div>
  10. <!--<form class="navbar-form navbar-left" action="/action_page.php">
  11. <div class="form-group">
  12. <input type="text" class="form-control" placeholder="#input_teg">
  13. </div>
  14. <button type="submit" class="btn btn-default">Искать</button>
  15. </form>-->
  16. <ul class="nav navbar-nav">
  17. <li><a href="{{action('CRUDController@sport')}}"
  18. style = "color:#636c90;font-weight:500;font-size:24px" >#sport</a></li>
  19. <li><a href="{{action('CRUDController@it')}}"
  20. style = "color:#636c90;font-weight:500;font-size:24px" >#it</a></li>
  21. <li><a href="{{action('CRUDController@festive')}}"
  22. style = "color:#636c90;font-weight:500;font-size:24px" >#festive</a></li>
  23. <li><a href="{{action('CRUDController@index')}}"
  24. style = "color:#636c90;font-weight:500;font-size:24px" >#all</a></li>
  25. </ul>
  26. </div>
  27. </nav>
  28. <!-- меню !-->
  29. <br>
  30. <br>
  31. <table class="table table-striped">
  32. <thead>
  33. <tr>
  34. <!-- <th>ID</th> !-->
  35. <th>Название</th>
  36. <th>Описание</th>
  37. <th>Дата проведения</th>
  38. <th>Тип мероприятия</th>
  39. <th colspan="2">Действия</th>
  40. </tr>
  41. </thead>
  42. <tbody>
  43. @foreach($cruds as $post)
  44. <tr>
  45. <td> {{$post->title}} </td>
  46. <td>{{substr($post->post, 0,130).'...'}}</td>
  47. <td>{{$post->date}}</td>
  48. <td>{{$post->type}}</td>
  49. <td><a href="{{action('CRUDController@edit', $post->id)}}" class="btn btn-warning">Редактировать</a></td>
  50. <td>
  51. <form action="{{action('CRUDController@destroy', $post->id)}}" method="post">
  52. {{csrf_field()}}
  53. <input name="_method" type="hidden" value="DELETE">
  54. <button class="btn btn-danger" type="submit">Удалить</button>
  55. </form>
  56. </td>
  57. </tr>
  58. @endforeach
  59. </tbody>
  60. </table>
  61. </div>
  62. @endsection