artincms/laravel_gallery_system

Official ArtinCMS.com Laravel Gallery Systems Package

dev-master 2020-02-13 07:26 UTC

This package is auto-updated.

Last update: 2024-04-13 16:51:26 UTC


README

laravel gallery manager is a laravel package for

  • manage gallery
  • manage slider

Requiments

  • PHP >= 7.0
  • Laravel 5.5|5.6

Installation

Quick installation

composer require artincms/laravel_gallery_system
vendor publish
    @php artisan lgs:install --force --full
this command install all require package if you want install full requirement you should type '--full' for rewrite your vendor you should type '--force' for install manually this package you should bellow structure . at first publish bellow packages :
php artisan vendor:publish --provider="ArtinCMS\LGS\LGSServiceProvider" --force
php artisan vendor:publish --provider="ArtinCMS\LFM\LFMServiceProvider" --force
php artisan vendor:publish --provider="ArtinCMS\LCS\LCSServiceProvider" --force
php artisan vendor:publish --provider="ArtinCMS\LLS\LLSServiceProvider" --force
php artisan vendor:publish --provider="ArtinCMS\LVS\LVSServiceProvider" --force
php artisan vendor:publish --provider="ArtinCMS\LMM\LMMServiceProvider" --force

and sure bellow seed run in your project

 php artisan db:seed --class="ArtinCMS\LFM\Database\Seeds\FilemanagerTableSeeder"
 php artisan db:seed --class="ArtinCMS\LGS\Database\Seeds\LmmMorphableTableSeeder"

usage

for use this package you should use bellow helper function anywhere in your project such as in your controller . this helper function is :

create html modal for show Gallery manager in backed

        LGS_CreateModalGalleryManager()
      

create html iframe to show Slider manager in backed

            LGS_CreateModalSliderManager()
          

Show Gallery In front

for show gallery we use Vue js . you can create your page as bellow :

Browser

<script src="{{ asset('vendor/laravel_gallery_system/components/gallery.min.js') }}" defer></script>
.
.
.
.

  <div id="lgs_gallery">
        <laravel_gallery_system :gallery_id='0' :lang_id='1' :rtl=true :jalali_data=true></laravel_gallery_system>
    </div>

at first you should create js file to load vue and define component div as bellow :

window.Vue = require('vue');
Vue.component('laravel_gallery_system', require('./components/laravel_gallery_system/gallery/laravel_gallery_system.vue'));
window.onload = function () {
    const gallery = new Vue({
        el: '#lgs_gallery',
    });
}

if you dont want devlope gallery component you can use sample js file in 'public/vendor/laravel_gallery_system/components/gallery.min.js' and use it on your page . after you create js file (both you create or use sample js file) you should put component element in page as bellow

   <div id="lgs_gallery">
         <laravel_gallery_system :gallery_id='0' :lang_id='1' :rtl=true></laravel_gallery_system>
     </div>

Props

Props Type Default Description
gallery_id Number 0 gallery you want show if you set it to 0 show all gallery in main root
lang_id Number null The language item if set to null select all language
rtl Boolean true the direction of page rtl set true and ltr set to false

Other my Vue JS plugins

Project Description npm install
Vuex Vuex is a state management pattern + library for Vue.js applications npm install vuex --save
axios Promise based HTTP client for the browser and node.js npm install axios
Vue Translate Plugin A VueJS (1.x, 2.0+) plugin for basic translations. npm i vue-translate-plugin
Vue-scrollto Scrolling to elements was never this easy! npm install --save vue-scrollto