src/Http/Controllers/ThumbnailController.php
public function upload(ThumbnailRequest $request)
    {
        $crudeName = $request->input('crudeName');
        $crude = CrudeInstance::get($crudeName);
        $column = $request->input('columnName');
        $file = $request->file()['file'];

        $id = $request->input('modelId');
        $model = $crude->uploadThumbnailByIdAndColumn($id, $column, $file);

        return ['success' => true, 'model' => $model];
    }
public function upload(ThumbnailRequest $request)
    {
        $crudeName = $request->input('crudeName');
        $crude = CrudeInstance::get($crudeName);
        $column = $request->input('columnName');
        $file = $request->file()['file'];

        $id = $request->input('modelId');
        $model = $crude->uploadThumbnailByIdAndColumn($id, $column, $file);

        return ['success' => true, 'model' => $model];
    }
public function upload ( ThumbnailRequest $ request ) { $ crudeName = $ request -> input ( 'crudeName' ) ; $ crude = CrudeInstance :: get ( $ crudeName ) ; $ column = $ request -> input ( 'columnName' ) ; $ file = $ request -> file ( ) [ 'file' ] ; $ id = $ request -> input ( 'modelId' ) ; $ model = $ crude -> uploadThumbnailByIdAndColumn ( $ id , $ column , $ file ) ; return [ 'success' => true , 'model' => $ model ] ; }
Handle thumbnail upload
@author Wojciech Jurkowski <w.jurkowski@holonglobe.com>
Handle thumbnail upload