lubusIN /
laravel-gymie
| 1 | <?php |
||
| 2 | |||
| 3 | namespace App; |
||
| 4 | |||
| 5 | use Auth; |
||
| 6 | use Illuminate\Auth\Authenticatable; |
||
| 7 | use Illuminate\Database\Eloquent\Model; |
||
| 8 | use Illuminate\Auth\Passwords\CanResetPassword; |
||
| 9 | use Illuminate\Contracts\Auth\Authenticatable as AuthenticatableContract; |
||
| 10 | use Illuminate\Contracts\Auth\CanResetPassword as CanResetPasswordContract; |
||
| 11 | use Lubus\Constants\Status; |
||
|
0 ignored issues
–
show
|
|||
| 12 | use Zizaco\Entrust\Traits\EntrustUserTrait; |
||
| 13 | use Spatie\MediaLibrary\HasMedia\HasMediaTrait; |
||
| 14 | use Spatie\MediaLibrary\HasMedia\Interfaces\HasMediaConversions; |
||
| 15 | use Spatie\MediaLibrary\HasMedia\Interfaces\HasMedia; |
||
| 16 | |||
| 17 | class User extends Model implements AuthenticatableContract, CanResetPasswordContract, HasMediaConversions |
||
| 18 | { |
||
| 19 | use Authenticatable, CanResetPassword, EntrustUserTrait, HasMediaTrait; |
||
| 20 | |||
| 21 | /** |
||
| 22 | * The database table used by the model. |
||
| 23 | * |
||
| 24 | * @var string |
||
| 25 | */ |
||
| 26 | protected $table = 'mst_users'; |
||
| 27 | |||
| 28 | /** |
||
| 29 | * The attributes that are mass assignable. |
||
| 30 | * |
||
| 31 | * @var array |
||
| 32 | */ |
||
| 33 | protected $fillable = ['name', 'email', 'password','status']; |
||
| 34 | |||
| 35 | /** |
||
| 36 | * The attributes excluded from the model's JSON form. |
||
| 37 | * |
||
| 38 | * @var array |
||
| 39 | */ |
||
| 40 | protected $hidden = ['password', 'remember_token']; |
||
| 41 | |||
| 42 | // Media i.e. Image size conversion |
||
| 43 | public function registerMediaConversions() |
||
| 44 | { |
||
| 45 | $this->addMediaConversion('thumb') |
||
| 46 | ->setManipulations(['w' => 50, 'h' => 50, 'q' => 100, 'fit' => 'crop']) |
||
| 47 | ->performOnCollections('staff'); |
||
| 48 | |||
| 49 | $this->addMediaConversion('form') |
||
| 50 | ->setManipulations(['w' => 70, 'h' => 70, 'q' => 100, 'fit' => 'crop']) |
||
| 51 | ->performOnCollections('staff'); |
||
| 52 | } |
||
| 53 | |||
| 54 | public function scopeExcludeArchive($query) |
||
| 55 | { |
||
| 56 | if (Auth::User()->id != 1) |
||
| 57 | { |
||
| 58 | return $query->where('status','!=', \constStatus::Archive)->where('id','!=',1); |
||
| 59 | } |
||
| 60 | |||
| 61 | return $query->where('status','!=', \constStatus::Archive); |
||
| 62 | } |
||
| 63 | |||
| 64 | public function Role_user() |
||
| 65 | { |
||
| 66 | return $this->hasOne('App\Role_user'); |
||
| 67 | } |
||
| 68 | } |
||
| 69 |
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths