Laravel upload image error: Call to a member function move() on a non-object

时间:2015-09-14 16:17:42

标签: php laravel laravel-5

Im trying to do simple images upload in Laravel. But when I'm trying to submit form Laravel gives me error:

Call to a member function move() on a non-object

Method that stores image:

public function store(ArticleRequest $request)
{
    $destinationPath = 'uploads';
    $file = Input::file('image');
    $file->move($destinationPath, $file);
}

Upload Form:

 <div class="form-group">
    {!! Form::file('image',['class' => 'form-control']) !!}
</div>

0 个答案:

没有答案