Created
January 2, 2022 17:58
-
-
Save abdullahqureshi1994/d0e34fde3b2084267cfc709da3231c59 to your computer and use it in GitHub Desktop.
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 Illuminate\Http\Request; | |
use App\Service; | |
class CustomerController extends controller{ | |
public function store(Request $request){ | |
$data = $request->validate([ | |
'name' => 'required', | |
'email' => 'required', | |
]); | |
Service::insertCustomer($data); | |
Service::sendMail($data); | |
return [ | |
'saved'=> true | |
]; | |
} | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment