Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

laravel allow null records relationship

/**
 * Get the author of the post.
 */
public function user()
{
    return $this->belongsTo(User::class)->withDefault();
}
Source by laravel.com #
 
PREVIOUS NEXT
Tagged: #laravel #null #records #relationship
ADD COMMENT
Topic
Name
9+5 =