donnykurnia icon

fix belongsTo

donnykurnia | PRO | 08/20/16 04:21:11 PM UTC | 0 ⭐ | 335 👁️ | Never ⏰ | []
PHP |

550 B

|

None

|

0 👍

/

0 👎

<?php
 
namespace App;
 
use Illuminate\Foundation\Auth\User as Authenticatable;
 
class User extends Authenticatable
{
    /**
     * The attributes that are mass assignable.
     *
     * @var array
     */
    protected $fillable = [
        'name', 'email', 'username', 'password'
    ];
 
    /**
     * The attributes that should be hidden for arrays.
     *
     * @var array
     */
    protected $hidden = [
        'password', 'remember_token',
    ];
    
    public function office()
    {
        return $this->belongsTo('App\Office');
    }
}

Comments