Kartik FileInput Controller example (Multiple upload)

[color="#222222"][size="2"]Does anyone have any examples of how would the CONTROLLER to upload multiple files using the Kartik FileInput?[/size][/color]

[color="#222222"][size="2"]I need also of how it would be for the scenario CREATE and UPDATE[/size][/color]

echo FileInput::widget([

    'name' => 'attachments[]',




    'pluginOptions' => [


            Html::img("/images/moon.jpg", ['class'=>'file-preview-image', 'alt'=>'The Moon', 'title'=>'The Moon']),

            Html::img("/images/earth.jpg",  ['class'=>'file-preview-image', 'alt'=>'The Earth', 'title'=>'The Earth']),






Come on guys, help me again. I’m really hard on that part…

Is there any project that use I can see?


for that u have to create another table to store filename and do code in base controller to insert multiple files using foreach loop.