AuthGoogle - Change model user, add model provider
This commit is contained in:
parent
8b7214a1c7
commit
2f58ce32ec
25
app/Models/Provider.php
Normal file
25
app/Models/Provider.php
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Models;
|
||||||
|
|
||||||
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||||
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
|
||||||
|
class Provider extends Model
|
||||||
|
{
|
||||||
|
use HasFactory;
|
||||||
|
protected $fillable = [
|
||||||
|
'provider',
|
||||||
|
'id_provider',
|
||||||
|
'avatar'
|
||||||
|
];
|
||||||
|
|
||||||
|
protected $hidden = [
|
||||||
|
'created_at',
|
||||||
|
'updated_at'
|
||||||
|
];
|
||||||
|
|
||||||
|
public function users(){
|
||||||
|
return $this->belongsTo(User::class,'id_user');
|
||||||
|
}
|
||||||
|
}
|
@ -33,4 +33,7 @@ public function plans(){
|
|||||||
public function evidencias(){
|
public function evidencias(){
|
||||||
return $this->hasMany(Evidencia::class,'id');
|
return $this->hasMany(Evidencia::class,'id');
|
||||||
}
|
}
|
||||||
|
public function providers(){
|
||||||
|
return $this->hasMany(Provider::class,'id_user');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user