Yohohohohohooho | Sanrei Aya
Sanrei Aya


Server : LiteSpeed
System : Linux barito.iixcp.rumahweb.net 5.14.0-611.49.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Apr 21 16:39:08 EDT 2026 x86_64
User : elvh3918 ( 1528)
PHP Version : 8.2.31
Disable Function : mail
Directory :  /home/elvh3918/public_html/pmm/app/Http/Controllers/Report/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/elvh3918/public_html/pmm/app/Http/Controllers/Report/ItemReportController.php
<?php

namespace App\Http\Controllers\Report;

use App\Http\Controllers\Controller;
use Illuminate\Support\Facades\Request;
use App\Models\Master\Tenant;
use Illuminate\Support\Facades\Auth;
use Carbon\Carbon;

class ItemReportController extends Controller
{
    public function index()
    {
        $breadcrumbs = [
            ['link' => "dashboard", 'name' => "Dashboard"], ['link' => "report/item", 'name' => "Report Item"]
        ];

        $tenant = Auth::user()->load('model');
        if (Auth::user()->model_type == 'App\Models\Master\Tenant') {
            $tenant = Tenant::where('id', '=', Auth::user()->model_id)->orderBy('name', 'asc');
            $tenant_id = Auth::user()->model_id;
        } else if (Auth::user()->model_type == 'App\Models\Bussiness') {
            $tenant = Tenant::orderBy('name', 'asc');
            $tenant_id = 0;
        }

        $tenant = $tenant->get();
        return view('content.report.item', compact('tenant', 'tenant_id'), ['breadcrumbs' => $breadcrumbs]);
    }
}

Yohohohohohooho | Sanrei Aya