I'm making web app using Laravel and AngularJS. To prevent CSRF, I added following script to index.php file.
<script>
angular.module("contactApp").constant("CSRF_TOKEN", '<?php echo csrf_token(); ?>');
</script>
But it shows the following Fatal error.
"Call to undefined function csrf_token()"
In Laravel setting, I changed the View Storage Paths in view.php to public_html folder. It seems it makes the error. How I can solve this problem with using an alternative View Storage Paths?