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.
27 lines
544 B
PHTML
27 lines
544 B
PHTML
1 year ago
|
<?php
|
||
|
|
||
|
namespace App\Http\Controllers\Customer;
|
||
|
|
||
|
use App\Http\Controllers\Controller;
|
||
|
use App\Models\poinHistory;
|
||
|
|
||
|
class PoinController extends Controller
|
||
|
{
|
||
|
public function index()
|
||
|
{
|
||
|
$poins = PoinHistory::where('customer_id', auth()->id())
|
||
|
->orderBy('updated_at', 'desc');
|
||
|
|
||
|
return inertia('Poin/Index', [
|
||
|
'poins' => $poins->paginate(20),
|
||
|
]);
|
||
|
}
|
||
|
|
||
|
public function show(poinHistory $poin)
|
||
|
{
|
||
|
return inertia('Poin/Detail', [
|
||
|
'poin' => $poin,
|
||
|
]);
|
||
|
}
|
||
|
}
|