dray

ArgumentCountError: Too few arguments to function App\Http\Controllers\ResourcesController::searchUdemy(), 0 passed in /vendor/laravel/framework/src/Illuminate/Routing/Controller.php on line 54 and exactly 1 expected

laravel Icon

ArgumentCountError

Too few arguments to function App\Http\Controllers\ResourcesController::searchUdemy(), 0 passed in /vendor/laravel/framework/src/Illuminate/Routing/Controller.php on line 54 and exactly 1 expected

An unhandled exception occurred on line 29
26
    }
27
28
29
    public function searchUdemy($query){
30
31
        $baseUrl = "https://www.udemy.com/api-2.0/";

Solution

It is something minor
I made the argument of the function optional            
Apr 17, 2021 Anyone

0 replies


Install the browser extension

Found this solution helpful? Try our extension for quick solutions to your Laravel errors.

Chrome logo Add to Chrome - It's free