<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;
use App\Models\Ticket;
use App\Models\Company;
use App\Models\User;
use Illuminate\Support\Facades\Session;
use Illuminate\Support\Facades\Auth;

class DashboardController extends Controller
{
    public function dashboard()
    {
    
        $tickets =  get_current_company_tickets(['type' => 'inbox']);
        return view('index', ['tickets' => $tickets]);
    }
    
    public function waiting()
    {
       
        $tickets = get_current_company_tickets(['status' => 'waiting']);
        return view('waiting', ['tickets' => $tickets]);
    }
    
    public function profile()
    {
        $users = User::where('role_id', '!=', 1)->where('id', '!=', Auth::id())->get();
        return view('profile', ['users' => $users]);
    }
}
