Answer the question
In order to leave comments, you need to log in
I upload an image using CKEditor, Laravel 5.1 swears at the lack of a csrf token. How to add a token to a request?
I upload an image using CKEditor, Laravel 5.1 swears at the lack of a csrf token.
How to add a token to a request?
Answer the question
In order to leave comments, you need to log in
Add to views
If the request is via ajax, then add this:
P.S.
Just call ajaxSetup before CKEditor:
<script src="//code.jquery.com/jquery.min.js"></script>
<script src="js/config.js"></script> <!-- сюда вставляем $.ajaxSetup (не забываем обернуть в $(function () {...});) -->
<script src="js/ckeditor.js"></script>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question