User.php 623 B

1234567891011121314151617181920212223242526272829303132
  1. <?php
  2. namespace App;
  3. use Illuminate\Foundation\Auth\User as Authenticatable;
  4. use Illuminate\Database\Eloquent\Model;
  5. use Zizaco\Entrust\Traits\EntrustUserTrait;
  6. class User extends Authenticatable
  7. {
  8. use EntrustUserTrait;
  9. protected $fillable = [
  10. 'name', 'email', 'password', 'utype',
  11. ];
  12. protected $hidden = [
  13. 'password', 'remember_token',
  14. ];
  15. public function company_data()
  16. {
  17. return $this->belongsTo('App\Models\CompanyModel', 'company', 'id');
  18. }
  19. /*public function employee()
  20. {
  21. return $this->belongsTo('App\Models\Employee');
  22. }*/
  23. }