Answers for "laravel get the inverse of many to many relationship"

PHP
0

laravel inverse one to many relationship

<?php

namespace AppModels;

use IlluminateDatabaseEloquentModel;

class Comment extends Model
{
    /**
     * Get the post that owns the comment.
     */
    public function post()
    {
        return $this->belongsTo(Post::class);
    }
}
Posted by: Guest on June-10-2021

Code answers related to "laravel get the inverse of many to many relationship"

Browse Popular Code Answers by Language