Answer the question
In order to leave comments, you need to log in
Can't find the service provider class?
File app/Providers/CustomRegisterProvider:
namespace App\Providers;
use Illuminate\Support\ServiceProvider;
use App\Services\CustomRegister;
class CustomRegisterProvider extends ServiceProvider
{
/**
* Bootstrap the application services.
*
* @return void
*/
public function boot()
{
//
}
/**
* Register the application services.
*
* @return void
*/
public function register()
{
$this->app->bind('App\Services\CustomRegisterContract', function(){
return new CustomRegister();
});
}
}
...
use App\Services\CustomRegister as Register;
class RegisterController extends Controller
{
...
/**
* Регистрация потребителя
*
* @param Request $request
*/
public function consumer(Request $request, Register $register){
...
}
}
ReflectionException in Route.php line 286:
Class App\Services\CustomRegister does not exist
Answer the question
In order to leave comments, you need to log in
use App\Services\CustomRegister\CustomRegisterProvider as Register;
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question