Answers for "is not invokable."

0

is not invokable.

<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
class HomeController extends Controller
{
    public function __invoke(Request $request)
    {
        return "Welcome to our homepage"
    }
}
Posted by: Guest on December-17-2020
0

is not invokable.

if you forget to choose your method:

     Route::get('/', 'WelcomeController')->name('welcome');
 
change it to:

     Route::get('/', [WelcomeController::class, 'index'])->name('welcome');
 
 
or

     Route::get('/', 'WelcomeController@YOUR_METHOD_NAME')->name('welcome');
Posted by: Guest on June-17-2021

Browse Popular Code Answers by Language