File manager module for the Lumen PHP framework.

Overview

Lumen File Manager

Code Climate Scrutinizer Code Quality StyleCI Latest Stable Version Total Downloads License

File manager module for the Lumen PHP framework.

Please note that this module is still under active development.

NOTE: Branch 5.1 is for using Lumen Framework 5.1 and 5.2. Only bug fixes for 1.1.X should be tagged here.

Requirements

Usage

Installation

Run the following command to install the package through Composer:

composer require nordsoftware/lumen-file-manager

Bootstrapping

Please note that we only support Doctrine for now, but we plan to add Eloquent support soon.

Add the following lines to bootstrap/app.php:

$app->register('Nord\Lumen\FileManager\Doctrine\ORM\DoctrineServiceProvider'); // For ORM
// $app->register('Nord\Lumen\FileManager\Doctrine\ODM\DoctrineServiceProvider'); // For ODM
$app->register('Nord\Lumen\FileManager\FileManagerServiceProvider');

Add base_path('vendor/nordsoftware/lumen-file-manager/src/Doctrine/ORM/Resources') to your Doctrine mapping paths.

For ODM, add base_path('vendor/nordsoftware/lumen-file-manager/src/Doctrine/ODM/Resources').

You can now use the FileManager facade or inject the Nord\Lumen\FileManager\Contracts\FileManager where needed.

Example

Below is an example of how to use this module to save a file from the request and return a JSON response with the saved file's ID and URL.

public function uploadFile(Request $request, FileManager $fileManager)
{
    $file = $fileManager->saveFile($request->file('upload'));

    return Response::json([
        'id' => $file->getId(),
        'url' => $fileManager->getFileUrl($file),
    ]);
}

Contributing

Please read the guidelines.

License

MIT. See LICENSE.

You might also like...
CORS (Cross-Origin Resource Sharing) support for Laravel and Lumen

Description This package adds Cross-Origin Resource Sharing (CORS) support to your Laravel application. The package is based on Framework agnostic (PS

A Laravel and Lumen Badges Generator

Laravel and Lumen Badge Generator That package is a easy wrapper to Badges/Poser. #Installing composer require vluzrmos/laravel-badge-poser Laravel co

 Provides a Eloquent query builder for Laravel or Lumen
Provides a Eloquent query builder for Laravel or Lumen

This package provides an advanced filter for Laravel or Lumen model based on incoming requets.

Stripe integration in Lumen

Lumen Boilerplate/Starter App for Stripe payment processing Core Features return all available subscription plans create a subscription check subscrip

Chinese to Pinyin translator for Laravel5 / Lumen based on overtrue/pinyin.

Laravel-pinyin Chinese to Pinyin translator for Laravel5 / Lumen based on overtrue/pinyin. Install composer require "overtrue/laravel-pinyin:~4.0" For

Laravel and Lumen Auto Hard Deleter
Laravel and Lumen Auto Hard Deleter

Laravel Auto Hard Deleter This package deletes soft deleted rows automatically after a time interval that you define. For Laravel and Lumen 6, 7, 8 In

Laravel Lumen service provider for Understand.io

The service provider is deprecated - it does not support error grouping. Laravel Lumen service provider for Understand.io You may also be interested i

🔐 JSON Web Token Authentication for Laravel & Lumen
🔐 JSON Web Token Authentication for Laravel & Lumen

Documentation Documentation for 1.* here For version 0.5.* See the WIKI for documentation. Supported by Auth0 If you want to easily add secure authent

Lumen rest api demo with Dingo/Api, JWT, CORS, PHPUNIT

lumen-api-demo 这是一个比较完整用 lumen 5.7 写的的 REST API 例子。使用了 dingo/api ,jwt 实现登录,功能上很简单,登录,注册,发帖,评论,单元测试(正在补充)。 lumen5.x 请看对应的分支 有需要随时联系我 lumen/laravel/rest

Comments
  • Add support for Lumen 5.4

    Add support for Lumen 5.4

    This module should be made compatible with Lumen 5.4.

    For example on line https://github.com/nordsoftware/lumen-file-manager/blob/develop/src/FileManagerServiceProvider.php#L91 $container->make is given 2 arguments but in Lumen 5.4 the method only accepts 1. This results in

    Unresolvable dependency resolving [Parameter #0 [ <required> array $config ]] in class Nord\\Lumen\\FileManager\\Adapters\\DiskAdapter
    

    This is documented in https://laravel.com/docs/5.4/upgrade under "make Method Parameters".

    There might be other things to update too.

    opened by jukump 2
  • Support for S3 Pre-Signed URL

    Support for S3 Pre-Signed URL

    Add support for getting a file's pre-signed URL to S3: https://docs.aws.amazon.com/aws-sdk-php/v3/guide/service/s3-presigned-url.html

    Should be applied to the S3Adapter.

    enhancement Hacktoberfest 
    opened by soderluk 1
  • Default adapters cause file saving to fail if all adapters are not setup

    Default adapters cause file saving to fail if all adapters are not setup

    Commenting out S3 and Cloudinary adapters from FileManagerServiceProvider.php $defaultAdapters fixes this. Otherwise you get a League\Flysystem error where it tries to create an adapter but cannot because it doesn't have enough config data.

    Fix would be to make local adapter the only default one. Now the default adapters config is merged with defined adapter config which doesn't remove the default ones if they don't exist.

    opened by laxu 1
  • Add unit tests

    Add unit tests

    Codeception recommended.

    Run tests on Travis CI.

    Bonus points for code coverage (possibly via Code Climate).

    See https://github.com/nordsoftware/lumen-cors for reference.

    Hacktoberfest 
    opened by hugovk 0
Owner
Digia
We share the passion for writing great code.
Digia
Laravel Manager provides some manager functionality for Laravel

Laravel Manager Laravel Manager was created by, and is maintained by Graham Campbell, and provides some manager functionality for Laravel. Feel free t

Graham Campbell 371 Jul 11, 2022
File manager for Laravel

Laravel File Manager DEMO: Laravel File Manager Vue.js Frontend: alexusmai/vue-laravel-file-manager Documentation Laravel File Manager Docs Installati

Aleksandr Manekin 895 Sep 20, 2022
Teste dos mano do pay lá ft. Lumen Framework

Teste dos caras lá pay Avisos antes de começar Crie um repositório no seu GitHub sem citar nada relacionado a empresa dos cara lá. (CHECK) Faça seus c

Daniel Reis 25 Aug 29, 2022
A Slack Invitator made with Lumen Framework.

Lumen - Slackin A Slack Invitator made with Lumen Framework and inspired by rauchg/slackin. That application uses some of my awesome packages: Badge P

Vagner Luz do Carmo 56 May 3, 2020
Simple Video is a automated H264 encryption system built on Lumen Laravel Framework

Simple Video is a automated H264 encryption system built on Lumen Laravel Framework

Azril Nazli Alias 3 Aug 1, 2022
Sebuah aplikasi file hosting sederhana yang berguna untuk menyimpan berbagai file

About Laravel Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable and creative experie

Willy Ferry 2 Nov 25, 2021
🧩 Generator Manager for 🙃 Phony Framework

?? Generator Manager This repository contains the Generator Manager for ?? Phony Framework. ?? Start generating fake data with ?? Phony Framework, vis

Phonyland 2 Jan 7, 2022
Public API for the project coding.events. Made in PHP 8.0 with Lumen 8, PHP-FPM, NGINX and MySQL 8.

coding.events API Uma API feita apenas para passar o tempo, montando uma API para o site <coding.events>. Sinta-se livre para usar esse código como es

Kaique Garcia 4 Dec 29, 2021
📦 Adds Laravel Packages Support to Lumen and Vendor Publish Artisan Command.

Laravel Package Support for Lumen: Makes Lumen compatible with Laravel Packages. You can use any Laravel Packages in Lumen by installing Larasupport Package.

Irfaq Syed 122 Aug 19, 2022
A collection of generators for Lumen and Laravel 5.

Lumen generators A collection of generators for Lumen and Laravel 5. Contents Why ? Installation Quick Usage Detailed Usage Model Generator Migration

Amine Ben hammou 349 Mar 24, 2022