Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

insert timestamp to pivot table in laravel

//user 	user_roles	roles

public function roles()
{
    return $this->belongsToMany(Role::class)->withTimestamps();
}
Source by laraveldaily.com #
 
PREVIOUS NEXT
Tagged: #insert #timestamp #pivot #table #laravel
ADD COMMENT
Topic
Name
6+4 =