View difference between Paste ID: yFU3UBVx and 88AwaeKm
SHOW: | | - or go back to the newest paste.
1
<?php
2
3
namespace App;
4
5
use Illuminate\Database\Eloquent\Model;
6
7-
class Offices extends Model
7+
class Office extends Model
8
{
9
    //
10
	protected fillable = [
11
		'office_name'
12
	];
13
	
14-
	public function user()
14+
	public function users()
15
	{
16-
		return $this->hasMany('App\User', 'office_id');
16+
		return $this->hasMany('App\User');
17
	}
18
}