mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-06-03 06:24:35 -04:00
Check for controller redirect
This commit is contained in:
parent
f7094ecff7
commit
3b5190326a
@ -17,8 +17,12 @@ use App\Models\Invoice;
|
|||||||
|
|
||||||
class DashboardController extends Controller
|
class DashboardController extends Controller
|
||||||
{
|
{
|
||||||
public function index(): \Illuminate\View\View
|
public function index(): \Illuminate\View\View|\Illuminate\Http\RedirectResponse
|
||||||
{
|
{
|
||||||
|
if (auth()->guard('contact')->user()->client->getSetting('enable_client_portal_dashboard') === false) {
|
||||||
|
return redirect()->route('client.invoices.index');
|
||||||
|
}
|
||||||
|
|
||||||
$total_invoices = Invoice::withTrashed()
|
$total_invoices = Invoice::withTrashed()
|
||||||
->where('client_id', auth()->guard('contact')->user()->client_id)
|
->where('client_id', auth()->guard('contact')->user()->client_id)
|
||||||
->where('is_deleted', 0)
|
->where('is_deleted', 0)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user