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
PHP

<?php
namespace App\Http\Controllers\Customer;
use App\Http\Controllers\Controller;
use App\Models\CoinHistory;
class CoinController extends Controller
{
public function index()
{
$coins = CoinHistory::where('customer_id', auth()->id())
->orderBy('updated_at', 'desc');
return inertia('Coin/Index', [
'coins' => $coins->paginate(20),
]);
}
public function show(CoinHistory $coin)
{
return inertia('Coin/Detail', [
'coin' => $coin,
]);
}
}