aboutsummaryrefslogtreecommitdiffstats
path: root/source/app/Models/Skill.php
blob: 3df88d664d84766242993015a70db00c8c16454f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsToMany;

class Skill extends Model
{
    protected $fillable = [
        'name',
        'description',
    ];

    /**
     * The students that have this skill.
     */
    public function student(): BelongsToMany
    {
        return $this->belongsToMany(Student::class);
    }

    /**
     * The companies that require this skill.
     */
    public function company(): BelongsToMany
    {
        return $this->belongsToMany(Company::class);
    }
}