2020-03-23 18:10:42 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App\Http\Controllers\ClientPortal;
|
|
|
|
|
|
|
|
use App\Http\Controllers\Controller;
|
|
|
|
use App\Http\Requests\ClientPortal\ShowCreditRequest;
|
|
|
|
use App\Models\Credit;
|
2020-10-28 11:10:49 +01:00
|
|
|
use Illuminate\Contracts\View\Factory;
|
|
|
|
use Illuminate\View\View;
|
2020-03-23 18:10:42 +01:00
|
|
|
|
|
|
|
class CreditController extends Controller
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* Display listing of client credits.
|
|
|
|
*
|
2020-10-28 11:10:49 +01:00
|
|
|
* @return Factory|View
|
2020-03-23 18:10:42 +01:00
|
|
|
*/
|
|
|
|
public function index()
|
|
|
|
{
|
2020-04-23 00:49:23 +02:00
|
|
|
return $this->render('credits.index');
|
2020-03-23 18:10:42 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
public function show(ShowCreditRequest $request, Credit $credit)
|
|
|
|
{
|
2021-05-18 12:03:06 +02:00
|
|
|
set_time_limit(0);
|
|
|
|
|
|
|
|
$data = ['credit' => $credit];
|
|
|
|
|
|
|
|
|
|
|
|
if ($request->query('mode') === 'fullscreen') {
|
|
|
|
return render('credits.show-fullscreen', $data);
|
|
|
|
}
|
|
|
|
|
|
|
|
return $this->render('credits.show', $data);
|
2020-03-23 18:10:42 +01:00
|
|
|
}
|
|
|
|
}
|