Category Archives: Laravel

responsive file manager with laravel

Official

https://github.com/Kwaadpepper/laravel-responsivefilemanager

Thumb folder creation issue on windows:

System will try to create thumb folders with relative path and will fail to detect if the folder exists or not in
\vendor\kwaadpepper\laravel-responsivefilemanager\src\ResponsiveFileManager\utils.php

 

Eloquent to access another DB

Reference:

  1. https://stackoverflow.com/questions/31847054/how-to-use-multiple-databases-in-laravel

Tinymce config for Laravel File Manager

 

Middleware for localization

Creating a middleware file

Add middleware to app/Http/Kernel.php

Apply middleware in route.php

Middleware

Note

  1. Constructor of a controller will be execute before route, middleware and session.

Reference

  1. https://laravel.com/docs/5.4/middleware

Model Trait for Laravel

Trait

Usage

 

Upload File to S3 using Laravel

Local file

Other related helper functions

 

Custom Usage of Laravel Filemanager

HTML

Javascript (lfm_app.js):

Model to handle Image

 

NestedTree Notes

Wiki:

https://en.wikipedia.org/wiki/Nested_set_model

Update nest_left and nest_right values of all nodes:

Notes:

  • In October CMS, a category must have nest_left and nest_right values or it will cause serious error.