How and where to fit the Java scripts in the Laravel Blade page ?

Question

<script>
/* Favorites Translation */
var lang = {
labelSavePostSave: “{!! t(‘Save Job’) !!}”,
labelSavePostRemove: “{{ t(‘Saved Job’) }}”,
loginToSavePost: “{!! t(‘Please log in to save the Ads.’) !!}”,
loginToSaveSearch: “{!! t(‘Please log in to save your search.’) !!}”,
confirmationSavePost: “{!! t(‘Post saved in favorites successfully !’) !!}”,
confirmationRemoveSavePost: “{!! t(‘Post deleted from favorites successfully !’) !!}”,
confirmationSaveSearch: “{!! t(‘Search saved successfully !’) !!}”,
confirmationRemoveSaveSearch: “{!! t(‘Search deleted successfully !’) !!}”
};

$(document).ready(function ()
{
/* Get Post ID */
$(‘.email-job’).click(function(){
var postId = $(this).attr(“data-id”);
$(‘input[type=hidden][name=post]’).val(postId);
});

@if (isset($errors) and $errors->any())
@if (old(‘sendByEmailForm’)==’1′)
$(‘#sendByEmail’).modal();
@endif
@endif
});
</script>

0
Rakesh.Kumar 3 months 0 Answers 185 views 0

Leave an answer

Browse
Browse