Laravel中RouteCollection.php第219行中的MethodNotAllowedHttpException

时间:2016-02-20 09:09:10

标签: laravel

我在laravel中使用了illuminate / html来创建表单并向其插入数据。 这是我的routes.php:

Route::post('/userlog', 'LogController@userlog');

这是我的观点:

@extends('layouts.master')
@section('content')
    {!! Form::open(['url' => '/userlog']) !!}
        <div class="form-group">
            {!! Form::label('phone', 'User phone:') !!}
            {!! Form::text('phone', null, ['class' => 'form-control input-sm']) !!}
        </div>
    {!! Form::close() !!}
@endsection

这是控制器:

namespace App\Http\Controllers;

use Illuminate\Foundation\Bus\DispatchesJobs;
use Illuminate\Routing\Controller as BaseController;
use Illuminate\Foundation\Validation\ValidatesRequests;
use Illuminate\Foundation\Auth\Access\AuthorizesRequests;
use Illuminate\Http\Requests;

class LogController extends Controller
{
    public function userlog(Request $request)
    {
        $input = $request::all();
        print_r($input);die();
    }

}

我遇到这个错误: RouteCollection.php第219行中的MethodNotAllowedHttpException:

有什么问题?

0 个答案:

没有答案