Search
 
SCRIPT & CODE EXAMPLE
 

PHP

Laravel store multiple files

    public function fileUpload(Request $request)
    {
        if ($request->hasfile('filenames')) {
            foreach ($request->file('filenames') as $file) {
                $name = $file->getClientOriginalName();
                $file->move(public_path() . '/mytestfile/', $name);
                $data[] = $name;
            }
            return back()->with('Success!','Data Added!');
        }
    }
Comment

PREVIOUS NEXT
Code Example
Php :: how to restart php-fpm on ubuntu 
Php :: laravel make model and migration 
Php :: laravel eloquent sum column 
Php :: php substr remove last 4 characters 
Php :: check empty laravel blade 
Php :: laravel get class name 
Php :: array flip php 
Php :: php array continued 
Php :: larvel check two password 
Php :: get session id in laravel 
Php :: create date from string php 
Php :: auto submit button php 
Php :: to start XAMPP ubuntu 
Php :: php base64 encoded image to png 
Php :: wordpress remove quick edit custom post type 
Php :: remove double space php 
Php :: return back in laravel 
Php :: what is forelse in laravel 
Php :: php convert multidimensional object to array 
Php :: difference betwen include and indlude once 
Php :: laravel join with multiple conditions 
Php :: disable block editor on widget section wordpress 
Php :: laravel if file is image 
Php :: get number of chars ina string php 
Php :: laravel websockets onclose 
Php :: upload file laravel 
Php :: php iterate array keys 
Php :: Database//Eloquent//Model.php laravel errror array t- string conversion 
Php :: php force download csv 
Php :: laravel get auth user in constructor 
ADD CONTENT
Topic
Content
Source link
Name
8+9 =