jeudi 5 octobre 2017

notfoundhttp exception while post request

I have researched all the previous answers of this similar question, yet I couldnt found any.

I am simply accessing the function which I have made custom

Routes

Route::post('dashboard', 'Admin\UserController@index');

UserController.php

<?php
namespace App\Http\Controllers;

use DB;
use Session;
use App\Http\Requests;
use Illuminate\Http\Request;

class UserController extends Controller 
{
    /**
     * Create a new controller instance.
     *
     * @return void
     */
    public function __construct()
    {
        $this->middleware('auth');
    }

    /**
     * Show the application dashboard.
     *
     * @return \Illuminate\Http\Response
     */
    public function index(Request $request)
    {
        echo "welcome"

    }
}

When I am trying this,it throws me

NotFoundHttpException in RouteCollection.php line 161:

error.



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire