View difference between Paste ID: dip1eFzz and RX3VxrTa
SHOW: | | - or go back to the newest paste.
1
<?php
2
3
namespace App;
4
5
use Illuminate\Foundation\Auth\User as Authenticatable;
6
7
class User extends Authenticatable
8
{
9
    /**
10
     * The attributes that are mass assignable.
11
     *
12
     * @var array
13
     */
14
    protected $fillable = [
15
        'name', 'email', 'username', 'password'
16
    ];
17
18
    /**
19
     * The attributes that should be hidden for arrays.
20
     *
21
     * @var array
22
     */
23
    protected $hidden = [
24
        'password', 'remember_token',
25
    ];
26
	
27-
	public function offices()
27+
	public function office()
28
	{
29-
		return $this->belongsTo('App\Offices', 'office_id');
29+
		return $this->belongsTo('App\Office');
30
	}
31
}