Design Pattern : Service Layer with Laravel 5
François Louchart
30813

Hi thanks :)

write in L5.3

(I’m not an expert Laravel)

To create this kind of service I created (in your example) the MAKE method directly in CreateCouponRequest.
Upon injection into the controller, I’m just a (in CreateCouponController)

public function createCoupon(CreateCouponRequest $request)
{
$request->make();
...
}
class CreateCouponRequest extends FormRequest
{
....
/**
* Create coupon from Controller
*/
public function make()
{
dd('HERE');
}

}

Is this a good practice?

Thank you