-
Notifications
You must be signed in to change notification settings - Fork 11.5k
Closed
Description
- Laravel Version: 5.7.22
- PHP Version: 7.2.4
- Database Driver & Version: -
Description:
When you add a route to a controller function that does not exist, laravel throws a ReflectionException
instead of a BadMethodCallException
. The exception says that the function ()
does not exist.
Steps To Reproduce:
- Edit your
web.php
file like this (does not happen when you pass the controller and function as string)
Route::get('/test', [TestController::class, 'index']);
- Create the
TestController
but don't create functionindex
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
class TestController extends Controller
{
//
}
- Visit the new route
Expected behaviour would be that laravel tells which function does not exist.
HadiNiazi
Metadata
Metadata
Assignees
Labels
No labels