I created service in app/services/SubscriptionService.php
then import it into controller use App\Services\SubscriptionService;
and then in controller
public function subscribeIt(SubscriptionService $SubscriptionService, Request $request){
$response = $SubscriptionService->subscribeIt($request);
...
}
But in result of execution I am getting Class App\Services\SubscriptionService does not exist
Do I need to register it in provider ? This is in provider
public function register()
{
//
$this->app->bind('App\Services\SubscriptionService', function ($app) {
return new SubscriptionService();
});
}
from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/2Fzs3lx
via IFTTT
Aucun commentaire:
Enregistrer un commentaire