Type hint all device model relations (#12686)

This commit is contained in:
Jellyfrog
2021-03-31 17:28:47 +02:00
committed by GitHub
parent dc160c6813
commit 4b6efba040
28 changed files with 90 additions and 64 deletions

View File

@@ -26,6 +26,7 @@ namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsToMany;
class Bill extends Model
{
@@ -48,7 +49,7 @@ class Bill extends Model
// ---- Define Relationships ----
public function ports()
public function ports(): BelongsToMany
{
return $this->belongsToMany(\App\Models\Port::class, 'bill_ports', 'bill_id', 'bill_id');
}