You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
46 lines
841 B
PHTML
46 lines
841 B
PHTML
3 months ago
|
<?php
|
||
|
|
||
|
namespace App\Http\Controllers;
|
||
|
|
||
|
use App\Http\Requests\CustomerRequest;
|
||
|
use App\Models\Customer;
|
||
|
|
||
|
class CustomerController extends Controller
|
||
|
{
|
||
|
public function index()
|
||
|
{
|
||
|
return view('customer.index');
|
||
|
}
|
||
|
|
||
|
public function store(CustomerRequest $request)
|
||
|
{
|
||
|
dd($request);
|
||
|
|
||
|
return Customer::create($request->validated());
|
||
|
}
|
||
|
|
||
|
public function create()
|
||
|
{
|
||
|
return view('customer.create');
|
||
|
}
|
||
|
|
||
|
public function show(Customer $customer)
|
||
|
{
|
||
|
// return $customer;
|
||
|
}
|
||
|
|
||
|
public function update(CustomerRequest $request, Customer $customer)
|
||
|
{
|
||
|
// $customer->update($request->validated());
|
||
|
|
||
|
// return $customer;
|
||
|
}
|
||
|
|
||
|
public function destroy(Customer $customer)
|
||
|
{
|
||
|
// $customer->delete();
|
||
|
|
||
|
// return response()->json();
|
||
|
}
|
||
|
}
|