2017-08-24 24 views
5

Bắt lỗi trong laravel lớp điều khiển đơn giản với đoạn mã sauPhương pháp không được phép Http Exception laravel 5.4

MethodNotAllowedHttpException

namespace App\Http\Controllers; 

use Illuminate\Http\Request; 
use DB; 
use app\Http\Requests; 
use Illuminate\Support\Facades\Auth; 


class ProfileController extends Controller 
{ 


    private $userId; 

    public function __construct() 
    { 
     $this->userId = Auth::id();  
    } 

} 

Route:

Route::post('user_profile','[email protected]'); 

gọi theo: <form action="/user_profile" method="post">

+1

chia sẻ lỗi hoàn chỉnh .... cũng chia sẻ chi tiết tuyến đường. – Naincy

+0

hoàn thành, không có phương pháp nào khác –

+0

phương pháp nào? ĐƯỢC? BÀI ĐĂNG? PUT/PATCH? XÓA BỎ? Chúng tôi cần thông tin, thông tin, thông tin ... – delboy1978uk

Trả lời

0

Tôi phải chạy

php artisan config:clear 
php artisan cache:clear 
php artisan route:clear 
Các vấn đề liên quan