Symfony \ Component \ Debug \ Exception \ FatalThrowableError在字符串上调用成员函数store()

时间:2019-10-16 06:34:57

标签: laravel-6.2

这是我的表单代码

@extends('layouts.app')

@section('content')
<div class="container">
    <div class="row justify-content-center">
        <div class="col-md-8">
            <div class="card">
                <div class="card-header">Write to the AWS S3 Bucket</div><br>

                <div class="card-body">
                <form action="{{route('store')}}" method="POST" enctype="multipart/form-data">
                    @csrf
                    <label>Enter you text: </label> <br>
                    <textarea name ="mytext1" class="form-control" name="mytext1"></textarea><br>
                    <input type="submit" class="btn btn-primary">
                </form>
                </div>
            </div>
        </div>
    </div>
</div>
@endsection

路线详细信息

Route::get('/', function () {
    return view('upload');
});

Route::POST('store',function() {

    $upload= request()->input('mytext1')->store(
       'text1',
       's3'
    );

})->name('store');

Auth::routes();

Route::get('/home', 'HomeController@index')->name('home');

按提交按钮时出现此错误 Symfony \ Component \ Debug \ Exception \ FatalThrowableError 调用字符串中的成员函数store()

如果您知道如何解决此问题,请帮助我

0 个答案:

没有答案