This commit is contained in:
2026-03-14 20:59:41 -05:00
parent be71e7c1f9
commit 9afd74fe52
78 changed files with 51866 additions and 1926 deletions

View File

@@ -7,6 +7,10 @@ use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\DB;
use Asantibanez\LivewireCharts\LivewireCharts;
use Asantibanez\LivewireCharts\RadarChartModel;
use Asantibanez\LivewireCharts\TreeMapChartModel;
use Livewire\Component;
use Carbon\Carbon;
//Application Library
@@ -23,24 +27,41 @@ use App\Models\Esi\EsiToken;
use App\Models\Auth\UserPermission;
use App\Models\Auth\UserRole;
use App\Models\Auth\User;
use App\Models\Auth\UserAlt;
class DashboardController extends Controller
class DashboardController extends Controller implements HasMiddleware
{
public function __construct() {
//$this->middleware('auth');
//$this->middleware('role:User');
/**
* Get the middleware that should be assigned to the controller
*/
public static function middleware() : array {
return [
new Middleware('auth');
new Middleware('role:User');
];
}
public function displayDashboard() {
$esiToken = new EsiToken;
$altCount = null;
$alts = null;
$esiHelper = new Esi;
$config = config('esi');
$esi = new Eseye();
//dd($esi);
$characterInfo = $esi->invoke('get', '/characters/{character_id}/', [
'character_id' => 92471016,
$roleEntry = UserRole::where([
'character_id' => auth()->user()->character_id,
]);
dd($characterInfo);
$role = $roleEntry->role;
/**
* Alt Counts
*/
$altCount = UserAlt::where([
'main_id' => auth()->user()->character_id,
])->count();
return view('dashboard.dashboard')->with(['characterId' => $esiToken->refresh_token]);
return view('dashboard.dashboard')->with('altCount', $altCount)
->with('role', $role);
}
}