Answers for "laravel inverse one to one relationship"

0

laravel inverse one to one relationship

<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class Phone extends Model
{
    /**
     * Get the user that owns the phone.
     */
    public function user()
    {
        return $this->belongsTo(User::class);
    }
}
Posted by: Guest on July-24-2021

Code answers related to "laravel inverse one to one relationship"

Browse Popular Code Answers by Language