Answers for "one to many laravel relation inverse"

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 "one to many laravel relation inverse"

Browse Popular Code Answers by Language