Skip to content
Filemanager integrator with tinyMCE for laravel framework.
JavaScript PHP Java CSS ActionScript HTML
Branch: master
Clone or download

Latest commit

Fetching latest commit…
Cannot retrieve the latest commit at this time.

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
config
src
composer.json
readme.md

readme.md

FileManager for Laravel 5.3.|5.4.|5.5.|5.6.|5.8.*

Installation

Laravel 5.x:

You can install the package for your Laravel 5 project through Composer.

$ composer require seguce92/filemanager

Register the service provider array in app/config/app.php if laravel version is <= 5.4.

Seguce92\Filemanager\ServiceProvider::class,

You can optionally use the facade for shorter code. Add this to your facades in array aliases:

'Filemanager' => Seguce92\Filemanager\FileManagerFacade::class,

Export setting file and resources with command:

$ php artisan vendor:publish

Configuration

To start using the file manager perform the respective configuration in the file app\config\seguce92\filemanager.php

    /**
     * PATH GLOBAL FILEMANAGER EMBED IN TINYMCE EDITOR
     * --------------------------------------------------------------
     *  Path filemanager resources
     */
    'filemanager' => '/filemanager/',

    /**
     * TITLE MODAL DIALOG
     * --------------------------------------------------------------
     *  Title of the modal dialog
     */
    'filemanager_title' => 'FileManager for Laravel with tinymce',

    /**
     * ROUTE OR URL
     * --------------------------------------------------------------
     *  Route or url
     */
    'url'	=>	'admin/filemanager/',

    /**
     * SINGLE IMPUT
     * --------------------------------------------------------------
     *  Single file manager charge in modal dialog
     */
    'single_filemanager'	=>	'filemanager/dialog.php?type=1&amp;field_id=image-filemanager&amp;relative_url=1',

    /**
     * FRAMEWORK STYLE
     * --------------------------------------------------------------
     * Select a use framework style (bootstrap, materializecss)
     */
    'style' =>  'bootstrap',

    /**
     * CUSTOM ICONS
     * --------------------------------------------------------------
     *  Custom icons relative style
     */
    'icons' => [
        'bootstrap' =>  [
            'select'    =>  'glyphicon glyphicon-picture',
            'clear' =>  'glyphicon glyphicon-trash'
        ],

        'materializecss'    =>  [
            'select'    =>  'photo',
            'clear' =>  'delete'
        ]
    ],

Use

Add style

{!! Filemanager::style() !!}

Add script

{!! Filemanager::script() !!}

Embend in TinyMCE 4 Editor

  1. First add the style and script directives

  2. In the content section use the directive

    {!! Filemanager::textarea('title for label') !!}
  3. In the script section use the directive

    {!! Filemanager::tinymce() !!}

Single input with Dialog Responsive Filemanager

  1. First add the style and script directives

  2. In the content section use the directive

    {!! Filemanager::input('title for label') !!}

Example

@extends('layouts.app')

@section('style')
    {!! Html::style('path/to/bootstrap.min.css') !!}
    {!! Filemanager::style() !!}
@endsection

@section('content')
    <div class="row">
        <div class="col-md-10 col-md-offset-1">
            <div class="form-group">
                <label for="title">title</label>
                <input type="text" name="title" id="title" class="form-control">
            </div>
            {!! Filemanager::textarea('content') !!}

            {!! Filemanager::input('image') !!}

            <div class="form-group">
                <a href="{{ url('/') }}" class="btn btn-danger">CANCEL</a>
                <button type="submit" class="btn btn-success">SAVE</button>
            </div>
        </div>
    </div>
@endsection

@section('script')
    {!! Html::style('path/to/jquery.min.js') !!}
    {!! Html::style('path/to/bootstrap.min.css') !!}
    {!! Filemanager::script() !!}
    {!! Filemanager::tinymce() !!}
@endsection

Information and Details

visit site mascodigo.net

You can’t perform that action at this time.