Laravel: Using mock instance in Customised Route::model binding
问题 Route model binding in Laravel, helps bind an instance to the service container, to be used in a controller action. And the beautiful thing is that when I want to write tests, I can bind a mock instance to the application, which replaces what is bound to the container. - App::instance($className, $mockInstance); I have made a request to the route ( Route::get("/{class_name}") ). I want to return an instance of the class, depending on what the value of the route parameter class_name is. If the