Advertisement
fel19

Untitled

Jul 23rd, 2020
426
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.55 KB | None | 0 0
  1.  
  2. @if (Session::has('info'))
  3. <div class="alert alert-success" role="alert">
  4. {{ Session::get('info') }}
  5. </div>
  6. @endif
  7. @extends('admin.index')
  8. @section('content')
  9. <form action="/categories/category/store" method="POST">
  10. {{ csrf_field() }}
  11. <?php
  12. use Illuminate\Support\MessageBag;
  13. /** @var MessageBag $errors */
  14. ?>
  15.  
  16. <div class="p-4 mb-2"><h1>Создание категории</h1>
  17. <div class="form-group"><label for="inputDesription" class="col-xs-2 control-label">Введите описание(desription)</label>
  18. <div class="col-xs-10">
  19. <input type="text" name="desription" class="form-control" placeholder="введите описание" id="desription"></div
  20.  
  21. <? if($errors->first("desription") != "") echo "<div class='alert'>".$errors->first("desription")."</div>"; ?>
  22. </div>
  23. </div>
  24. <div> <label for="inputKeywords" class="col-xs-2 control-label">Введите keywords</label>
  25. <div class="col-xs-10">
  26. <input type="text" name="keywords" placeholder="введите ключевые слова" id="inputKeywords">
  27. <? if($errors->first("keywords") != "") echo "<div class='alert'>".$errors->first("keywords")."</div>"; ?>
  28. </div>
  29. </div>
  30.  
  31. <div> <div class="form-group"><label for="inputtitle" class="col-xs-2 control-label">Введите заголовок</label>
  32. <div class="col-xs-10">
  33. <input type="text" name="title" placeholder="введите заголовок" id="title"></div>
  34. <? if($errors->first("title") != "") echo "<div class='alert'>".$errors->first("title")."</div>"; ?>
  35. </div>
  36. </div>
  37. <div class="form-group">
  38. <label>Category</label>
  39. <select class="form-control input-sm" name="category_id">
  40. <option value="">--select--</option>
  41. @foreach ($category as $row)
  42. <option value="{{$row->id}}">{{$row->name}}</option>
  43. @endforeach
  44. </select>
  45. </div>
  46. {{-- <div> <div class="form-group"><label for="inputtitle" class="col-xs-2 control-label">Введите подкатегорию</label>--}}
  47. {{-- <div class="col-xs-10">--}}
  48. {{-- <input type="text" name="{{$category->$childCategory}}" placeholder="введите заголовок" id="title"></div>--}}
  49. {{-- <? if($errors->first("title") != "") echo "<div class='alert'>".$errors->first("title")."</div>"; ?>--}}
  50. {{-- </div>--}}
  51. {{-- </div>--}}
  52. {{-- <div> <div class="form-group"><label for="inputtitle" class="col-xs-2 control-label">Введите подкатегорию</label>--}}
  53. {{-- <div class="col-xs-10">--}}
  54. {{-- <input type="text" name="title" placeholder="введите заголовок" id="title"></div>--}}
  55. {{-- <? if($errors->first("title") != "") echo "<div class='alert'>".$errors->first("title")."</div>"; ?>--}}
  56. {{-- </div>--}}
  57. {{-- </div>--}}
  58.  
  59.  
  60. <div><div class="form-group"><label for="inputslug" class="col-xs-2 control-label">Введите урл страницы</label>
  61. <div class="col-xs-10">
  62. <input type="text" name="slug" placeholder="Укажите slug"></div>
  63. <? if($errors->first("slug") != "") echo "<div class='alert'>".$errors->first("slug")."</div>"; ?>
  64. </div>
  65. </div>
  66.  
  67. <div><div class="form-group"><label for="inputtextl" class="col-xs-2 control-label">Введите описание категории</label>
  68. <div class="col-xs-10">
  69. <textarea rows="10" cols="45" name="text" placeholder="введите пост статьи"></textarea></div>
  70. <? if($errors->first("text") != "") echo "<div class='alert'>".$errors->first("text")."</div>"; ?>
  71. </div>
  72. </div>
  73.  
  74. <label for="">Статус</label>
  75. <select class="form-control" name="published">
  76. <?php if(isset($categories->id)): ?>
  77. <option value="0" <?php if($categories->published == 0): ?> selected="" <?php endif; ?>>Не опубликовано</option>
  78. <option value="1" <?php if($categories->published == 1): ?> selected="" <?php endif; ?>>Опубликовано</option>
  79. <?php else: ?>
  80. <option value="0">Не опубликовано</option>
  81. <option value="1">Опубликовано</option>
  82. <?php endif; ?>
  83. </select>
  84. <input type="submit" value="Отправить">
  85. </form>
  86. @endsection
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement