<?php

namespace App\Helpers;

class SessionHelper
{
    public static function getStudentUserId()
    {
        // For Laravel sessions
        if (session()->has('student_login1.userid')) {
            return session('student_login1.userid');
        }
        
        // Fallback to native PHP session for compatibility
        if (isset($_SESSION['student_login1']['userid'])) {
            return $_SESSION['student_login1']['userid'];
        }
        
        return null;
    }
}