edit.blade.php 1.1 KB

1234567891011121314151617181920212223242526272829303132333435
  1. <div class="ibox float-e-margins">
  2. <div class="ibox-content" style="display: block;">
  3. {!! Form::model($category,['route' => ['admin.category.update',$category->id]
  4. , 'class' => 'form-horizontal'
  5. , 'role' => 'form'
  6. , 'method' => 'post'
  7. ,'id'=>'Category_form']) !!}
  8. @include('course_backend::category.form')
  9. {!! Form::close() !!}
  10. <!-- /.tab-content -->
  11. </div>
  12. </div>
  13. <script>
  14. $('#Category_form').ajaxForm({
  15. success: function (result) {
  16. if (!result.status) {
  17. swal(result.message, '', "error")
  18. } else {
  19. swal({
  20. title: "保存成功!",
  21. text: "",
  22. type: "success"
  23. }, function () {
  24. location = '{{route('admin.course.category.index', ['id' => $category->group_id])}}';
  25. });
  26. }
  27. }
  28. });
  29. </script>