2017 © Pedro Peláez
 

library laravel-upload-helper

Upload helper library for Laravel

image

oval/laravel-upload-helper

Upload helper library for Laravel

  • Thursday, November 13, 2014
  • by jamestrusleroval
  • Repository
  • 2 Watchers
  • 3 Stars
  • 476 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 5 Versions
  • 6 % Grown

The README.md

PHP_Laravel_Upload_Helper

Include our library using the composer name: "oval/laravel-upload-helper": "v1.0.3", (*1)

Controller:, (*2)

Here is an example of a controller method, (*3)

public function PostTestUpload()
{
    $file = Input::file( "File" );

    // Check if any file was uploaded
    if( Input::hasFile( "File" ) )
    {            
        $validation = Validator::make( 
            array( "File" => $file ), // Values
            array( "File" => "mimes:png" ) // Rules
        );

        if( !$validation->fails() )
        {
            UploadHelper::UploadFile( $file, "location/of/file", uniqid() . "_" . $file->getClientOriginalName() );
        }            
        else
        {
            print_r( $validation->messages() );
        }            
    }
    else
    {
        // Redirect with some error saying upload a file!
        echo "Ah, no file was uploaded...<br />";
    }
}

View:, (*4)

Here is an example of the view, (*5)

<form enctype='multipart/form-data' method="post" action='<?=action('TestController@PostTestUpload')?>'>
    Upload <input type='file' name="File" />
    <button>UPLOAD</button>
</form>

The Versions

13/11 2014

dev-master

9999999-dev https://github.com/jamestrusleroval/PHP_Laravel_Upload_Helper

Upload helper library for Laravel

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

laravel upload files

13/11 2014

v1.0.3

1.0.3.0 https://github.com/jamestrusleroval/PHP_Laravel_Upload_Helper

Upload helper library for Laravel

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

laravel upload files

13/11 2014

v1.0.2

1.0.2.0 https://github.com/jamestrusleroval/PHP_Laravel_Upload_Helper

Upload helper library for Laravel

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

laravel upload files

13/11 2014

v1.0.1

1.0.1.0 https://github.com/jamestrusleroval/PHP_Laravel_Upload_Helper

Upload helper library for Laravel

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

laravel upload files

12/11 2014

v1.0

1.0.0.0 https://github.com/jamestrusleroval/PHP_Laravel_Upload_Helper

Upload helper library for Laravel

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

laravel upload files