PHPackages                             skycoder/sky-permission - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. skycoder/sky-permission

ActiveLibrary[Authentication &amp; Authorization](/categories/authentication)

skycoder/sky-permission
=======================

Sky Permission

221Blade

Since Dec 11Pushed 4y ago1 watchersCompare

[ Source](https://github.com/skycoder026/sky-permission)[ Packagist](https://packagist.org/packages/skycoder/sky-permission)[ RSS](/packages/skycoder-sky-permission/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Description [![Build Status](https://camo.githubusercontent.com/5f66dc4e3068851ea61784fac29acabd8f0ccb0273892cca5626b35870622f4d/68747470733a2f2f7365637572652e7472617669732d63692e6f72672f6a6572657369672f6a71756572792e686f746b6579732e706e67)](http://travis-ci.org/jeresig/jquery.hotkeys)
==============================================================================================================================================================================================================================================================================================

[](#description-)

**Laravel Filesaver** is a media saver package, that can help you to stored any kind of media file. And it is very easy to use and install.

This is a small package to easy and simplify your code.

**Speciality** it will automatically save file/image name with actual path into your database

Installation Process
--------------------

[](#installation-process)

```
composer require skycoder/laravel-filesaver

```

Uses
----

[](#uses)

Open your controller from where you want to store your media file and use this piece of line code into the method.

```
  $fileSaver = new Filesaver();

  $fileSaver->upload_file($request->form_variable, $modelName, 'database_fieldname', 'base-path');

```

or

```
  (new Filesaver())->upload_file($request->file_variable, $modelName, 'database_fieldname', 'base-path');

```

In both case you shoud import class `use Skycoder\LaravelFilesaver\Filesaver;` top of the class

Example Code
------------

[](#example-code)

```
