Skip to content

Instantly share code, notes, and snippets.

@abdullahnaseer
Created January 2, 2022 10:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save abdullahnaseer/46cc0e633f2bd9c8757244a38ccf1b06 to your computer and use it in GitHub Desktop.
Save abdullahnaseer/46cc0e633f2bd9c8757244a38ccf1b06 to your computer and use it in GitHub Desktop.
CustomerController - Evaluation of Laravel
<?php
namespace App\Http\Controllers;
use App\Http\Requests\Customer\CustomerStoreRequest;
use App\Services\CustomerService;
class CustomerController extends Controller
{
public function __construct(protected CustomerService $customerStoreService)
{
}
public function store(CustomerStoreRequest $request)
{
$this->customerStoreService->add($request->validated());
return ['saved' => true];
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment