<?php

namespace App;

use Illuminate\Notifications\Notifiable;
use Illuminate\Foundation\Auth\User as Authenticatable;

class User extends Authenticatable
{
    use Notifiable;

    /**
     * The attributes that are mass assignable.
     *
     * @var array
     */
    protected $fillable = [
        'source', 'event_id', 'bkash_payment', 'category','name', 'email', 'password', 'role', 'class', 
        'roll', 'group_name','section','session','skill', 'fathername', 'f_occupation',
        'mothername', 'm_occupation', 'present_address', 'parmanent_address',
        'dob', 'age', 'religion', 'bloodgroup',
        'hobby', 'institute', 'year', 'mobile', 'picture', 'permission'
    ];

    /**
     * The attributes that should be hidden for arrays.
     *
     * @var array
     */
    protected $hidden = [
        'password', 'remember_token',
    ];
    
    public function event() {
        return $this->belongsTo(Event::class, 'event_id');
    }
}