use Illuminate\Support\Facades\Schema;
public function boot()
{
Schema::defaultStringLength(191);
}
$filename = $_FILES["filename"]["name"];
move_uploaded_file($_FILES["filename"]["tmp_name"], "avatar/$filename");
$query = $connection->prepare("UPDATE table_user SET avatar = :avatar WHERE user_id = :user_id");
$query->bindParam(':avatar', $filename);
$query->bindParam(':user_id', $user_id);
$query->execute();