concaveit / media
A simple package for laravel media gallery for admin panel
Installs: 15
Dependents: 1
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Language:Blade
Requires
- intervention/image: ^2.7
This package is auto-updated.
Last update: 2025-03-06 02:37:34 UTC
README
Add bellow codes to master.blade.php in before body tag ends--
<script> jQuery(document).on('click','.initConcaveMedia',function(){ var inputName,inputType,imageWidth,imageHeight; inputName = jQuery(this).attr('data-input-name'); inputType = jQuery(this).attr('data-input-type'); imageWidth = jQuery(this).attr('data-image-width'); imageHeight = jQuery(this).attr('data-image-height'); imageResize = jQuery(this).attr('data-resize'); fileLocation = jQuery(this).attr('data-file-location'); jQuery(this).addClass('triggeredButton'); jQuery.ajax({ url: "{{route('concave.gallery')}}", type: "get", data: {inputName:inputName,inputType:inputType,imageWidth:imageWidth,imageHeight:imageHeight,imageResize:imageResize,fileLocation:fileLocation} , success: function (response) { jQuery('body').prepend(response); }, error: function(jqXHR, textStatus, errorThrown) { console.log(textStatus, errorThrown); } }); }) </script>@include('concaveit_media::includes/styles')
<script>
jQuery(document).on('click','.selected_image_remove',function(){
var removeItem = jQuery(this).attr('data-file-url');
jQuery(this).closest('span').remove();
jQuery('input[value="'+removeItem+'"]').remove();
});
</script>