restore composer.json, add mysqli extension
This commit is contained in:
34
app/Http/Controllers/Dashboard/Billing/Controller.php
Executable file
34
app/Http/Controllers/Dashboard/Billing/Controller.php
Executable file
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Dashboard\Billing;
|
||||
|
||||
use App\Http\Controllers\Controller as ExController;
|
||||
use App\Models\Billing;
|
||||
use App\Models\Currency;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class Controller extends ExController
|
||||
{
|
||||
public function index()
|
||||
{
|
||||
$this->authorize('view', 'billings');
|
||||
$billings = Billing::latest('id')
|
||||
->paginate(config(50));
|
||||
$currency = Currency::latest()->first();
|
||||
|
||||
return view('dashboard.billing.index', compact('billings', 'currency'));
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Request $request
|
||||
* @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
|
||||
*/
|
||||
public function search(Request $request)
|
||||
{
|
||||
$id = $request->get('query');
|
||||
$billings = Billing::where('id', $id)->orWhere('transaction_id', $id)->paginate(50);
|
||||
|
||||
return view('dashboard.billing.index', compact('billings'));
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user