Created
January 2, 2022 10:24
-
-
Save abdullahnaseer/46cc0e633f2bd9c8757244a38ccf1b06 to your computer and use it in GitHub Desktop.
CustomerController - Evaluation of Laravel
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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