<?php

namespace App\Http\Controllers\Student;

use App\Http\Controllers\Controller;
use App\Models\Personality;
use Illuminate\View\View;

class PersonalityController extends Controller
{
    public function index(): View
    {
        $personalities = Personality::orderBy('personality_code', 'asc')->get();

        return view('student.pages.personality.index', compact('personalities'));
    }

    public function view(string $slug): View
    {
        $personality = Personality::where('slug', $slug)->first();

        return view('student.pages.personality.detail', compact('personality'));
    }
}
