$table->unsignedBigInteger('user_id');
$table->foreign('user_id')
->references('id')->on('users')
->onDelete('cascade');
public function user()
{
return $this->belongsTo(User::class);
}
$user = User::find(1);
$firstUserAvatar = $user->avatar->img;