Skip to content

Instantly share code, notes, and snippets.

@Faizanq
Created July 27, 2022 06:17
Show Gist options
  • Save Faizanq/f7096495a66080e15c31d6ea55e98b7a to your computer and use it in GitHub Desktop.
Save Faizanq/f7096495a66080e15c31d6ea55e98b7a to your computer and use it in GitHub Desktop.
<?php
namespace App\Http\Controllers;
use App\Models\Customer;
use App\Http\Requests\NewCustomerRequest;
class CustomerController extends Controller
{
public function store(NewCustomerRequest $request)
{
$data = $request->all();
Customer::create($data);
return [
'saved' => true
];
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment